/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Duolingo-inspired Color Palette */
    --primary-green: #58cc02;
    --dark-green: #4caf50;
    --light-green: #89e219;
    --primary-blue: #1cb0f6;
    --dark-blue: #0284c7;
    --light-blue: #7dd3fc;
    --orange: #ff9600;
    --red: #ff4b4b;
    --purple: #ce82ff;
    --yellow: #ffc800;
    
    /* Background Colors */
    --bg-light: #f7fffe;
    --bg-white: #ffffff;
    --bg-section: #f0f9ff;
    
    /* Text Colors */
    --text-dark: #2b2b2b;
    --text-gray: #777777;
    --text-light: #ffffff;
    
    /* Shadows */
    --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 8px 24px rgba(0, 0, 0, 0.15);
    --shadow-strong: 0 12px 32px rgba(0, 0, 0, 0.2);
    
    /* Border Radius */
    --radius-small: 8px;
    --radius-medium: 16px;
    --radius-large: 24px;
    --radius-xl: 32px;
    
    /* Typography */
    --font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --footer-height: 80px; /* Default footer height */
}

body {
    font-family: var(--font-family);
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--light-blue) 100%);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    /* Desktop: Fixed height, no scroll */
    height: 100vh;
    overflow-y: hidden;
    font-size: 1.25rem; /* Increased base font size */
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-white);
    box-shadow: var(--shadow-soft);
    z-index: 1000;
    padding: 0 2rem;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 0;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.1) rotate(5deg);
}

.brand-name {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-green);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

/* Main Content */
.main {
    margin-top: 0;
    padding: 0.5rem 1rem 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow: hidden;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 0.5rem 2rem 0.1rem; /* Less padding below */
    position: relative;
    max-width: 1200px;
    margin: 0 auto 0.5rem auto; /* Less margin below */
    flex-shrink: 0;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.palm-tree {
    display: none; /* Hide palm trees to save space */
}

@keyframes sway {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

.hero-title {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 800;
    margin-bottom: 0.3rem;
    color: var(--primary-green);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.highlight {
    color: var(--primary-green);
    position: relative;
}

.highlight::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 8px;
    background: var(--yellow);
    border-radius: 4px;
    opacity: 0.3;
}

.wave {
    display: inline-block;
    width: 35px;
    height: 35px;
    background-image: url('assets/logo.png');
    background-size: cover;
    background-position: center;
    border-radius: 50%;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes wave {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(25deg); }
    75% { transform: rotate(-15deg); }
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-gray);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}



@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.speech-bubble {
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-white);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-medium);
    white-space: nowrap;
    font-weight: 600;
    color: var(--primary-green);
    border: 3px solid var(--light-green);
}

.speech-bubble::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: var(--bg-white);
}

/* Sections Container */
.sections-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    padding: 0 1.5rem;
    flex: 1;
    align-content: start; /* Align to top */
    align-items: start; /* Align items to top */
    max-height: none;
}

@media (max-width: 1000px) {
  .sections-container {
    grid-template-columns: 1fr;
    gap: 1.2rem;
    padding: 0 1rem;
    min-height: unset;
    height: unset;
  }
}

/* Section Styles */
.section {
    background: var(--bg-white);
    border-radius: var(--radius-large);
    padding: 1.2rem;
    min-height: auto; /* Remove fixed height */
    font-size: 1.35rem; /* Larger font in cards */
    box-shadow: var(--shadow-medium);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Align to top instead of center */
    align-items: center;
    height: auto; /* Auto height to fit content */
}

.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--primary-green), var(--primary-blue));
    border-radius: var(--radius-large) var(--radius-large) 0 0;
}

.section:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-strong);
}

.app-section {
    border: 3px solid var(--light-green);
}

.app-section:hover {
    border-color: var(--primary-green);
}

.mozambique-section {
    border: 3px solid var(--light-blue);
}

.mozambique-section:hover {
    border-color: var(--primary-blue);
}

.about-section {
    border: 3px solid var(--purple);
    cursor: default;
}

.about-section:hover {
    transform: none;
    border-color: var(--purple);
}

.section-content {
    text-align: center;
}

.section-icon {
    font-size: 2rem;
    margin-bottom: 0.3rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.section-title {
    font-size: 1.5rem;
    font-weight: 900;
    margin-bottom: 0.7rem;
    color: var(--text-dark);
}

.section-description {
    font-size: 1.05rem;
    color: var(--text-gray);
    margin-bottom: 1rem;
}

/* App Store Buttons */
.app-store-buttons {
    display: flex;
    gap: 0.4rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 0.6rem;
}

.store-button {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--text-dark);
    color: var(--text-light);
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-medium);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 600;
    box-shadow: var(--shadow-soft);
    font-size: 0.75rem;
}

.store-button:hover {
    background: var(--primary-green);
    transform: scale(1.05);
}

.store-button i {
    font-size: 1.5rem;
}

.store-text {
    display: block;
    font-size: 0.6rem;
    opacity: 0.8;
}

.store-name {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
}

/* Travel Icons */
.travel-icons {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin-bottom: 0.8rem;
}

.travel-icon {
    font-size: 1.5rem;
    animation: bounce 2s ease-in-out infinite;
}

.travel-icon:nth-child(2) { animation-delay: 0.5s; }
.travel-icon:nth-child(3) { animation-delay: 1s; }
.travel-icon:nth-child(4) { animation-delay: 1.5s; }

/* About Section Specific Styles */
.about-text {
    text-align: left;
    max-width: 800px;
    margin: 0 auto;
}

.about-text p {
    margin-bottom: 0.8rem;
    font-size: 1.1rem; /* Larger font size */
    line-height: 1.5;
    font-weight: 500; /* Slightly bolder */
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.8rem;
    margin: 1rem 0;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--bg-section);
    padding: 0.75rem;
    border-radius: var(--radius-medium);
    border: 2px solid var(--light-green);
    transition: all 0.3s ease;
    font-size: 1rem; /* Match theme font size */
    font-weight: 600; /* Make text more prominent */
}

.feature-item:hover {
    background: var(--light-green);
    transform: scale(1.05);
}

.feature-icon {
    font-size: 1.4rem; /* Larger icons to match the bigger text */
}

.vision-text {
    background: linear-gradient(135deg, var(--light-green), var(--light-blue));
    padding: 1.5rem;
    border-radius: var(--radius-medium);
    border-left: 6px solid var(--primary-green);
    font-weight: 600;
    text-align: center !important;
}

/* Palm Decorations */
.palm-decoration {
    font-size: 1rem;
    margin-top: 0.3rem;
    opacity: 0.7;
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: var(--text-light);
    text-align: center;
    padding: 0.6rem 1rem;
    margin-top: 0;
    flex-shrink: 0;
    min-height: fit-content;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0;
}

.footer-logo-img {
    width: 20px;
    height: 20px;
    border-radius: var(--radius-small);
}

.footer-logo span {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-green);
}

.footer-contacts {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.7rem;
}

.contact-label {
    font-weight: 600;
    color: var(--primary-green);
}

.contact-link {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-link:hover {
    color: var(--light-green);
    text-decoration: underline;
}

.footer-text {
    opacity: 0.8;
    margin-bottom: 0;
    font-size: 0.65rem;
    flex-basis: 100%;
    margin-top: 0.3rem;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 2000;
    padding: 1rem;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Ensure modal fits within viewport on single page layout */
@media (max-height: 700px) {
    .modal {
        max-height: 80vh;
        overflow-y: auto;
        padding: 1.5rem;
    }
    
    .modal-title {
        font-size: 1.4rem;
        margin-bottom: 0.5rem;
    }
    
    .modal-description {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
}

.modal {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    max-width: 500px;
    width: 100%;
    box-shadow: var(--shadow-strong);
    position: relative;
    transform: scale(0.7);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-gray);
    transition: color 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover {
    color: var(--red);
    background: rgba(255, 75, 75, 0.1);
}

.modal-content {
    text-align: center;
}

.modal-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: bounce 2s ease-in-out infinite;
}

.modal-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary-green);
}

.modal-description {
    font-size: 1.1rem;
    color: var(--text-gray);
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Email Form */
.email-form {
    margin-bottom: 1rem;
}

.email-label {
    display: block;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.input-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.email-input {
    flex: 1;
    min-width: 200px;
    padding: 1rem;
    border: 3px solid var(--light-green);
    border-radius: var(--radius-medium);
    font-size: 1rem;
    font-family: var(--font-family);
    transition: all 0.3s ease;
}

.email-input:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 4px rgba(88, 204, 2, 0.2);
}

.submit-button {
    background: var(--primary-green);
    color: var(--text-light);
    border: none;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-medium);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-family);
    box-shadow: var(--shadow-soft);
}

.submit-button:hover {
    background: var(--dark-green);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.submit-button:active {
    transform: translateY(0);
}

.submit-button:disabled {
    background: var(--text-gray);
    cursor: not-allowed;
    transform: none;
}

/* Success Message */
.success-message {
    display: none;
    background: var(--light-green);
    padding: 1.5rem;
    border-radius: var(--radius-medium);
    border: 3px solid var(--primary-green);
    margin-top: 1rem;
}

.success-message.show {
    display: block;
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.success-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* Loading Animation */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 3000;
}

.loading.show {
    display: flex;
}

.loading-spinner {
    font-size: 4rem;
    animation: spin 2s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.loading p {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-green);
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Mobile: Allow scrolling */
    body {
        height: auto;
        min-height: 100vh;
        overflow-y: auto;
    }
    
    .main {
        height: auto;
        min-height: 100vh;
        padding: 0.5rem 0.5rem 0;
        overflow: visible;
    }
    
    .nav {
        padding: 0.75rem 0;
    }
    
    .logo {
        width: 40px;
        height: 40px;
    }
    
    .brand-name {
        font-size: 1.5rem;
    }
    
    .hero {
        padding: 0.5rem 1rem;
    }
    
    .palm-tree {
        font-size: 1.8rem;
    }
    
    .palm-tree-left,
    .palm-tree-right {
        top: 0.2rem;
    }
    
    .palm-tree-left {
        left: 0.5rem;
    }
    
    .palm-tree-right {
        right: 0.5rem;
    }
    
    .hero-title {
        font-size: 1.8rem;
        margin-bottom: 0.3rem;
    }
    
    .wave {
        width: 30px;
        height: 30px;
    }
    
    .mascot-logo {
        width: 50px;
        height: 50px;
    }
    
    .sections-container {
        grid-template-columns: 1fr;
        margin: 0.3rem auto;
        gap: 0.8rem;
        padding: 0 0.5rem;
        min-height: 0;
    }
    
    .section {
        padding: 0.8rem;
    }
    
    .section-title {
        font-size: 1.2rem;
    }
    
    .section-description {
        font-size: 0.8rem;
        margin-bottom: 0.8rem;
    }
    
    .app-store-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.3rem;
    }
    
    .store-button {
        width: 100%;
        max-width: 200px;
        justify-content: center;
        padding: 0.4rem 0.8rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    
    .feature-item {
        padding: 0.4rem;
        font-size: 0.7rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-contacts {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .contact-item {
        justify-content: center;
        font-size: 0.8rem;
    }
    
    .footer {
        padding: 1rem;
    }
    
    .footer-text {
        font-size: 0.8rem;
        margin-top: 0.8rem;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .email-input {
        min-width: unset;
    }
    
    .modal {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }
    
    .speech-bubble {
        position: relative;
        top: unset;
        left: unset;
        transform: none;
        margin-top: 1rem;
        display: inline-block;
    }
    
    .speech-bubble::after {
        display: none;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 0 1rem;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .wave {
        width: 25px;
        height: 25px;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.1rem;
    }
    
    .section-description {
        font-size: 0.75rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        gap: 0.5rem;
    }
    
    .footer-contacts {
        gap: 0.5rem;
    }
    
    .contact-item {
        font-size: 0.7rem;
    }
    
    .footer-text {
        font-size: 0.7rem;
        margin-top: 0.5rem;
    }
    
    .modal {
        padding: 1.5rem 1rem;
    }
}

/* Additional viewport optimizations for single page layout */
@media (max-height: 600px) {
    .hero {
        padding: 0.3rem 2rem 0.2rem;
    }
    
    .hero-title {
        font-size: clamp(1.2rem, 3vw, 1.8rem);
        margin-bottom: 0.2rem;
    }
    
    .mascot-logo {
        width: 40px;
        height: 40px;
    }
    
    .sections-container {
        gap: 0.5rem;
        margin: 0.3rem auto;
    }
    
    .section {
        padding: 0.8rem;
    }
    
    .section-icon {
        font-size: 2rem;
        margin-bottom: 0.3rem;
    }
    
    .section-title {
        font-size: 1.1rem;
        margin-bottom: 0.3rem;
    }
    
    .section-description {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }
    
    .footer {
        padding: 0.5rem 2rem;
    }
    
    .footer-text {
        font-size: 0.7rem;
    }
    
    .palm-decoration {
        font-size: 1rem;
        margin-top: 0.2rem;
    }
}

@media (max-height: 500px) {
    .palm-tree {
        display: none;
    }
    
    .hero-title {
        font-size: clamp(1rem, 3vw, 1.4rem);
    }
    
    .mascot-logo {
        width: 30px;
        height: 30px;
    }
    
    .section-icon {
        font-size: 1.5rem;
        margin-bottom: 0.2rem;
    }
    
    .features-grid {
        gap: 0.3rem;
    }
    
    .feature-item {
        padding: 0.3rem;
        font-size: 0.6rem;
    }
    
    .palm-decoration {
        display: none;
    }
}

/* Ensure mobile browsers use viewport height correctly */
@supports (-webkit-touch-callout: none) {
    body {
        height: -webkit-fill-available;
    }
    
    .main {
        height: -webkit-fill-available;
    }
}

/* Print Styles */
@media print {
    .header,
    .modal-overlay,
    .loading {
        display: none !important;
    }
    
    .main {
        margin-top: 0;
    }
    
    .section {
        break-inside: avoid;
        box-shadow: none;
        border: 2px solid var(--text-dark);
    }
}

/* Tablet and larger screens: Keep desktop behavior */
@media (min-width: 769px) {
    body {
        height: 100vh;
        overflow-y: hidden;
    }

    .main {
        height: calc(100vh - var(--footer-height));
        overflow: hidden;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .footer {
        flex-shrink: 0;
        height: var(--footer-height);
    }
}

/* Large desktop optimization */
@media (min-width: 1200px) {
    .footer {
        padding: 1rem 2rem;
    }
    
    .footer-content {
        gap: 2rem;
    }
    
    .footer-contacts {
        gap: 2rem;
    }
    
    .contact-item {
        font-size: 0.9rem;
    }
    
    .footer-text {
        font-size: 0.85rem;
        margin-top: 0.8rem;
    }
}
