/* General Styles */
html {
  box-sizing: border-box;
  scroll-behavior: smooth;
}

*, *:before, *:after {
  box-sizing: inherit;
}

/* ========================================
   CSS VARIABLES - EarthSort Color Palette
   Logo-derived colors (maintain brand harmony)
   ======================================== */
:root {
  /* Primary palette - from logo */
  --color-primary-teal: #2C7A7B;      /* Logo background, primary brand color */
  --color-primary-green: #48BB78;     /* Logo landmasses, accent green */
  --color-ocean-blue: #5CA9E6;        /* Logo oceans, accent for CTAs/links */
  
  /* Neutrals */
  --color-warm-white: #FAFAF7;        /* Slightly warmer than pure white */
  --color-background: #F7F6F3;        /* Current background */
  --color-charcoal: #333333;          /* Body text */
  
  /* Tints for backgrounds/hover states */
  --color-teal-light: #E6F4F4;        /* Teal at ~10% for subtle backgrounds */
  --color-green-light: #E8F5E9;       /* Light green for sections (current) */
  --color-teal-dark: #256268;         /* Darker teal for hover states */
  
  /* Typography */
  --font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    font-family: var(--font-body);
    margin: 0;
    padding: 0;
    padding-top: 70px; /* Space for fixed header */
    background-color: var(--color-background);
    color: var(--color-charcoal);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: 16px; /* Base font size */
}

/* Typography - Headings */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
}

h1 {
    font-weight: 700;
}

/* Site Header (Sticky) */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    height: 70px;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.header-logo {
    height: 50px;
    width: auto;
    transition: transform 0.2s ease;
}

.header-logo:hover {
    transform: scale(1.05);
}

.header-nav {
    display: flex;
    align-items: center;
}

.header-nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 30px;
}

.header-nav-links li {
    margin: 0;
}

.header-nav-links a {
    text-decoration: none;
    color: var(--color-charcoal);
    font-weight: 500;
    font-size: 16px;
    transition: color 0.2s ease;
    padding: 8px 0;
}

.header-nav-links a:hover {
    color: var(--color-primary-teal);
}

.header-nav-links .header-cta {
    background: var(--color-primary-teal);
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.header-nav-links .header-cta:hover {
    background: var(--color-teal-dark);
    color: white;
    transform: translateY(-2px);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background-color: var(--color-charcoal);
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 3px;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Hero Section (Home Page) */
.hero-section {
    text-align: center;
    background: linear-gradient(135deg, var(--color-primary-teal), var(--color-primary-green));
    color: white;
    padding: 30px 20px 40px;
    position: relative;
    width: 100%;
    margin-top: -70px; /* Offset the body padding to go edge-to-edge */
    padding-top: 100px; /* Add extra top padding to account for fixed header */
}

/* Background overlay removed - using gradient background instead */

.hero-section .hero-logo {
    width: 100px;
    height: auto;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    position: relative;
    z-index: 1;
    margin: 8px 0;
    font-size: 2.2rem;
    font-weight: 700;
}

.hero-section p {
    position: relative;
    z-index: 1;
    margin: 10px 0 20px;
    font-size: 1.1rem;
}

.hero-section .app-store-badge {
    position: relative;
    z-index: 1;
    height: 45px;
    margin-top: 10px;
    transition: transform 0.2s ease;
}

.hero-section .app-store-badge:hover {
    transform: scale(1.05);
}

/* Legacy Header (keep for non-home pages during transition) */
.main-header {
    text-align: center;
    background: linear-gradient(135deg, var(--color-primary-teal), var(--color-primary-green));
    color: white;
    padding: 20px 20px;
    position: relative;
    width: 100%;
}

/* Background overlay removed - using gradient background instead */

.logo {
    width: 200px;
    height: auto; /* Ensures the logo maintains its aspect ratio */
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.main-header h1,
.main-header p {
    position: relative;
    z-index: 1;
    margin: 10px 0;
    text-align: center;
}

.main-header .app-store-badge {
    position: relative;
    z-index: 1;
    height: 40px;
    margin-top: 15px;
}

/* How It Works Section */
.how-it-works-section {
    padding: 40px;
    text-align: center;
    background-color: #FFFFFF;
}

.how-it-works-section h2 {
    color: var(--color-primary-teal);
    margin-bottom: 40px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    padding: 20px;
    box-sizing: border-box;
    min-width: 200px; /* Prevents steps from getting too squished */
}

.steps-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.step-icon {
    font-size: 3.5rem;
    color: var(--color-primary-green);
}

.step h3 {
    color: var(--color-primary-teal);
    margin: 20px 0 10px;
}

/* Mission Section */
.mission-section {
    padding: 40px;
    text-align: center;
    background-color: var(--color-green-light);
    margin-bottom: 20px;
}

.mission-section h2 {
    color: var(--color-primary-teal);
    margin-bottom: 20px;
}

.mission-section p {
    max-width: 800px;
    margin: 0 auto 20px;
}

/* Get the App Section */
.get-the-app-section {
    padding: 40px;
    text-align: center;
    background-color: var(--color-green-light);
}

.get-the-app-section h2 {
    color: var(--color-primary-teal);
    margin-bottom: 20px;
}

.app-store-badge-large {
    height: 55px;
    margin-top: 15px;
}

/* Features Section */
.features-section {
    padding: 40px;
    background-color: #FFFFFF;
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.features-section h2 {
    text-align: center;
    color: var(--color-primary-teal);
    margin-bottom: 20px;
    grid-column: 1 / -1;
}

.feature {
    padding: 30px;
    background: #FAFAFA;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* 2-column grid for tablets and up */
@media (min-width: 768px) {
    .features-section {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .features-section h2 {
        grid-column: 1 / -1;
    }
}

.feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    width: 275px;
    height: 275px;
    margin: 0 auto 15px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.feature h3 {
    color: var(--color-primary-teal);
    margin: 15px 0;
    font-size: 1.3em;
}

/* Product Section */
.product-section {
    padding: 40px;
    text-align: center;
    background-color: var(--color-green-light);
}

.product-section h2 {
    color: var(--color-primary-teal);
    margin-bottom: 20px;
}

.product-description {
    max-width: 800px;
    margin: 0 auto 30px;
    text-align: left;
}

.product-description ul {
    list-style-position: inside;
    padding-left: 0;
}

.screenshot-gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.screenshot {
    width: 100%;
    max-width: 250px; /* Adjust size as needed */
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.screenshot:hover {
    transform: scale(1.05);
}

/* Team Section */
.team-member {
    display: flex;
    align-items: center;
    flex-wrap: wrap; /* Allows wrapping on smaller screens */
    gap: 30px;
    margin-top: 20px;
    justify-content: center; /* Center content when it wraps */
}

.team-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.team-bio {
    flex: 1;
    min-width: 300px; /* Ensures bio has enough space */
}

.team-bio h3, .team-bio h4 {
    margin: 0 0 10px 0;
}

.team-bio h3 {
    color: var(--color-primary-teal);
}

.team-bio h4 {
    color: #555;
    font-weight: normal;
}

/* Button Styles */
a.btn {
    display: inline-block;
    margin-top: 0.5em;
    padding: 0.6em 1.2em;
    background: var(--color-primary-teal);
    color: white;
    text-decoration: none;
    border-radius: 6px;
}

a.btn:hover {
    background: var(--color-teal-dark);
}

/* Content Section  - Used on privacy and support page*/
.content-section {
    padding: 40px 80px;
    text-align: left;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin: 20px auto;
    width: 90%;
    max-width: 1200px;
    box-sizing: border-box;
}

.content-section h2,
.content-section h3,
.content-section p,
.content-section ul {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.content-section ul {
    padding-left: 40px;
    list-style-position: outside;
}

.content-section ul ul {
    margin: 10px 0 10px 20px;
}

.content-section li {
    margin-bottom: 8px;
    padding-left: 10px;
}

.content-section.text-center {
    text-align: center;
}

.content-section-alt {
    background-color: var(--color-green-light);
}

.content-section-highlight {
    background-color: #FFFBEA;
    border: 1px solid #F6E05E;
}

.content-section h2 {
    display: flex;
    align-items: center;
    gap: 15px; /* Space between icon and text */
    color: var(--color-primary-teal);
}

.material-icons.heading-icon {
    font-size: 2.5rem;
    color: var(--color-primary-teal);
}

.button-container {
    text-align: center;
    margin-top: 20px;
}

/* Quick Tips - on the Support page */
.quick-tips {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.quick-tip {
    background-color: var(--color-background);
    border-left: 5px solid #4CAF50;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.quick-tip h3 {
    margin-top: 0;
    color: var(--color-primary-teal);
}

/* Thumbsup/down- on the Support page */
.thumb-up {
    color: green;
    font-size: 24px; /* Adjust size if needed */
}

.thumb-down {
    color: red;
    font-size: 24px; /* Adjust size if needed */
}


/* Navigation */
.main-nav {
    background-color: var(--color-primary-teal);
    padding: 10px;
}

.nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap; /* Allows items to wrap to the next line on smaller screens */
    justify-content: center;
    align-items: center;
}

.nav-links li {
    padding: 0 15px;
}

.nav-links li + li { /* Adds a separator to all but the first item */
    border-left: 1px solid white;
}

.nav-links a {
    text-decoration: none;
    color: white;
    display: block; /* Makes the entire area clickable */
    padding: 5px 0;
}

/* Footer */
.main-footer {
    text-align: center;
    padding: 20px;
    background-color: var(--color-primary-teal);
    color: white;
    margin-top: auto;
    width: 100%;
}

/* Partner Cards Section */
.partners-cards-section {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
    background: transparent;
}

.partner-card {
    width: 100%;
    max-width: 350px;
    height: 400px;
    perspective: 1000px;
    cursor: pointer;
    background: transparent;
}

.partner-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.partner-card:hover .partner-card-inner {
    transform: rotateY(180deg);
}

.partner-card-front,
.partner-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-sizing: border-box;
    top: 0;
    left: 0;
}

.partner-card-front {
    background: linear-gradient(135deg, var(--color-primary-teal), var(--color-primary-green));
    color: white;
    z-index: 2;
    transform: rotateY(0deg);
}

.partner-card-back {
    background: white;
    color: var(--color-charcoal);
    transform: rotateY(180deg);
    border: 2px solid var(--color-primary-teal);
}

.partner-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    color: white;
}

.partner-card-front h3 {
    font-size: 1.5rem;
    margin: 15px 0;
    font-weight: 700;
}

.partner-card-subtitle {
    font-size: 1rem;
    font-style: italic;
    opacity: 0.9;
}

.partner-card-back h3 {
    font-size: 1.3rem;
    color: var(--color-primary-teal);
    margin-bottom: 20px;
    font-weight: 700;
}

.partner-card-back p {
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    body {
        font-size: 17px; /* Slightly larger font for mobile readability */
        padding-top: 60px; /* Adjust for smaller mobile header */
    }

    /* Site Header - Mobile */
    .site-header {
        height: 60px;
    }

    .header-container {
        padding: 0 20px;
    }

    .header-logo {
        height: 40px;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .header-nav {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .header-nav.active {
        max-height: 400px;
    }

    .header-nav-links {
        flex-direction: column;
        gap: 0;
        padding: 20px;
        width: 100%;
    }

    .header-nav-links li {
        width: 100%;
        border-bottom: 1px solid #eee;
    }

    .header-nav-links li:last-child {
        border-bottom: none;
    }

    .header-nav-links a {
        display: block;
        padding: 15px 0;
        font-size: 18px;
    }

    .header-nav-links .header-cta {
        margin-top: 10px;
        text-align: center;
        border-radius: 8px;
    }

    /* Hero Section - Mobile */
    .hero-section {
        padding: 25px 20px 35px;
        padding-top: 85px;
    }

    .hero-section .hero-logo {
        width: 80px;
        margin-bottom: 12px;
    }

    .hero-section h1 {
        font-size: 1.6rem;
    }

    .hero-section p {
        font-size: 0.95rem;
    }

    .hero-section .app-store-badge {
        height: 38px;
        margin-top: 15px;
    }

    /* Legacy Header - Mobile */
    .main-header {
        padding: 15px 20px;
    }

    .logo {
        width: 150px;
        margin-bottom: 10px;
    }

    .main-header .app-store-badge {
        height: 35px;
    }

    .main-header h1 {
        font-size: 2rem; /* Reduce font size on smaller screens */
        line-height: 1.2;
    }

    /* Make all main sections full-width with consistent padding on mobile */
    .mission-section,
    .how-it-works-section,
    .features-section,
    .product-section {
        padding-left: 20px;
        padding-right: 20px;
    }

    .steps-container {
        flex-direction: column;
    }

    .team-member {
        flex-direction: column;
        text-align: center;
    }

    .content-section {
        padding: 20px;
        width: 100%;
        margin: 10px 0;
        box-sizing: border-box;
    }
    
    .content-section ul {
        padding-left: 25px;
    }

    .nav-links {
        flex-direction: column;
        gap: 10px;
    }

    .main-nav {
        padding-left: 20px;
        padding-right: 20px;
    }

    .nav-links li + li {
        border-left: none; /* Removes separators on mobile */
    }

    .nav-links li {
        padding: 5px 15px;
    }

    .feature {
        flex: 1 1 100%;
        margin: 10px 0;
    }

    /* Partner cards - stack vertically, no flip on mobile */
    .partners-cards-section {
        flex-direction: column;
        align-items: center;
        padding: 20px;
    }

    .partner-card {
        max-width: 100%;
        height: auto;
        min-height: 300px;
        perspective: none;
    }

    .partner-card-inner {
        transform: none !important;
        position: static;
        height: auto;
    }

    .partner-card-front,
    .partner-card-back {
        position: static;
        transform: none !important;
        backface-visibility: visible;
        margin-bottom: 20px;
        min-height: 250px;
    }

    .partner-card-front {
        margin-bottom: 0;
    }

    .partner-card-back {
        border: 2px solid var(--color-primary-teal);
    }

    /* Show both sides on mobile (accordion-style) */
    .partner-card:hover .partner-card-inner {
        transform: none;
    }
}