/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4a6cf7;
    --accent-color: #ff6b6b;
    --dark-bg: #171c28;
    --light-bg: #f8f9fa;
    --text-dark: #2d3748;
    --text-light: #f8f9fa;
    --header-height: 80px;
    --border-radius: 8px;
    --transition: all 0.3s ease;
    
    /* App-specific colors */
    --mastermind-color: #3498db;
    --plants-color: #2ecc71;
    --sellsmart-color: #e74c3c;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--light-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 15px;
}

/* Header Styles */
.site-header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    display: flex;
    flex-direction: column;
}

.logo h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

.tagline {
    font-size: 12px;
    color: #777;
}

/* Navigation */
nav {
    display: flex;
    align-items: center;
}

.hamburger-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
    margin-left: 20px;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-dark);
    margin: 3px 0;
    transition: 0.4s;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin: 0 10px;
}

.nav-links a {
    display: flex;
    align-items: center;
    color: var(--text-dark);
    font-weight: 500;
    padding: 10px 15px;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.nav-links a i {
    margin-right: 5px;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary-color);
    background-color: rgba(74, 108, 247, 0.1);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), #845ef7);
    color: white;
    padding: 160px 0 80px;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h2 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

/* Main Content */
main {
    flex: 1;
    padding: 60px 0;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
    position: relative;
}

.section-title:after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 15px auto 0;
    border-radius: 2px;
}

/* App Grid */
.apps-section {
    padding: 40px 0;
}

.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.app-card {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: var(--transition);
}

.app-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.12);
}

.app-card-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.app-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.app-card:hover .app-card-image img {
    transform: scale(1.05);
}

.app-card-content {
    padding: 25px;
}

.app-card-content h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.app-card-content p {
    color: #666;
    margin-bottom: 20px;
}

.app-card-buttons {
    display: flex;
    gap: 10px;
}

.app-card-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 15px;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition);
    flex: 1;
}

.app-card-btn i {
    margin-right: 5px;
}

.btn-details {
    background-color: #f1f5f9;
    color: var(--text-dark);
}

.btn-details:hover {
    background-color: #e2e8f0;
}

.btn-store {
    background-color: var(--primary-color);
    color: white;
}

.btn-store:hover {
    background-color: #3a5bdf;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #6366f1, #4a6cf7);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.cta-content {
    max-width: 700px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: 2.2rem;
    margin-bottom: 20px;
}

.cta-content p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* Footer */
.site-footer {
    background-color: var(--dark-bg);
    color: var(--text-light);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand h3 {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: white;
}

.footer-brand p {
    opacity: 0.7;
}

.footer-links h4, .footer-contact h4 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: white;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.footer-contact p {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    opacity: 0.7;
}

.footer-contact i {
    margin-right: 10px;
}

.footer-contact a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

.footer-contact a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: var(--transition);
}

.social-link:hover {
    background-color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    opacity: 0.7;
    font-size: 0.9rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 30px;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 600px;
    position: relative;
    animation: slideIn 0.3s ease;
    box-shadow: 0 15px 50px rgba(0,0,0,0.15);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.close-btn:hover {
    color: var(--text-dark);
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* App-specific styles */
.mastermind-theme {
    --app-color: var(--mastermind-color);
}

.plants-theme {
    --app-color: var(--plants-color);
}

.sellsmart-theme {
    --app-color: var(--sellsmart-color);
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .hamburger-menu {
        display: flex;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background-color: white;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        padding: 20px 0;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 0;
        width: 100%;
    }

    .nav-links a {
        padding: 15px 20px;
        width: 100%;
        border-radius: 0;
    }

    .hero {
        padding: 140px 0 60px;
    }

    .hero-content h2 {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .app-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* For individual app pages */
.app-details {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 30px;
    max-width: 1000px;
    margin: 120px auto 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.app-header h1 {
    font-size: 2rem;
    margin: 0;
}

.app-store-btn {
    display: inline-flex;
    align-items: center;
    background-color: var(--primary-color);
    color: white;
    padding: 12px 25px;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition);
}

.app-store-btn:hover {
    background-color: #3a5bdf;
    transform: translateY(-3px);
}

.app-screenshots {
    margin-bottom: 30px;
}

.screenshot-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.app-screenshots img {
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: var(--transition);
}

.app-screenshots img:hover {
    transform: scale(1.03);
}

.app-description {
    margin-bottom: 40px;
}

.app-description h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.app-description h3 {
    font-size: 1.3rem;
    margin: 25px 0 15px;
    color: var(--text-dark);
}

.app-description ul {
    padding-left: 20px;
    margin-bottom: 20px;
}

.app-description li {
    margin-bottom: 8px;
}

.related-articles h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.article-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.article-card {
    background-color: #f8fafc;
    border-radius: var(--border-radius);
    padding: 25px;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid #e2e8f0;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.07);
}

.article-card h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.article-modal {
    display: none;
    position: fixed;
    z-index: 1100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.article-modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 30px;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 600px;
    position: relative;
    animation: slideIn 0.3s ease;
    box-shadow: 0 15px 50px rgba(0,0,0,0.15);
}

.article-close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.article-close:hover {
    color: var(--text-dark);
}

/* App-specific background colors for individual pages */
body.mastermind-page {
    background-color: #ebf3fd;
}

body.plants-page {
    background-color: #ebfaf0;
}

body.sellsmart-page {
    background-color: #fdf0ed;
}

@media screen and (max-width: 768px) {
    .app-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .screenshot-grid {
        grid-template-columns: 1fr;
    }
    
    .article-cards {
        grid-template-columns: 1fr;
    }
}