/* ===== MODERN CSS RESET ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    line-height: 1.5;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #1f2937;
    background-color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
    margin-top: 80px;
}

body.mobile-nav-open {
    overflow: hidden;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

ul,
ol {
    list-style: none;
}

/* ===== CSS VARIABLES ===== */
:root {
    /* Colors */
    --primary: #22c55e;
    --primary-dark: #16a34a;
    --primary-light: #86efac;
    --secondary: #059669;
    --accent: #10b981;

    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    --white: #ffffff;
    --black: #000000;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;

    /* Typography */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
    --text-6xl: 3.75rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Transitions */
    --transition: all 0.3s ease;
    --transition-fast: all 0.15s ease;

    /* Z-index */
    --z-header: 1000;
    --z-mobile-nav: 1100;
    --z-overlay: 1050;
    --z-modal: 1200;
}

/* ===== TYPOGRAPHY ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--gray-900);
    margin-bottom: var(--space-4);
}

h1 {
    font-size: var(--text-5xl);
}

h2 {
    font-size: var(--text-4xl);
}

h3 {
    font-size: var(--text-3xl);
}

h4 {
    font-size: var(--text-2xl);
}

h5 {
    font-size: var(--text-xl);
}

h6 {
    font-size: var(--text-lg);
}

p {
    margin-bottom: var(--space-4);
    color: var(--gray-600);
    line-height: 1.7;
}

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

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

/* ===== LAYOUT ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.container-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.section {
    padding: var(--space-16) 0;
    /* Reduced vertical padding from 5rem to 4rem */
}

.section--dark {
    background-color: var(--gray-900);
}

.section--dark .section__title,
.section--dark h2,
.section--dark h3,
.section--dark h4 {
    color: var(--white);
}

.section--dark .section__description,
.section--dark p {
    color: var(--gray-300);
}

.section--dark .section__subtitle {
    background-color: var(--gray-800);
    color: white;
}

.section--light {
    background-color: var(--gray-50);
}

.section-sm {
    padding: var(--space-16) 0;
}

.section-lg {
    padding: var(--space-24) 0;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-size: var(--text-base);
    font-weight: 600;
    border-radius: var(--radius-lg);
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    border: 2px solid transparent;
    white-space: nowrap;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-sm {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
}

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-lg);
}

/* ===== HEADER ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-200);
    z-index: var(--z-header);
    transition: var(--transition);
}

.header--scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-md);
}

.header--hidden {
    transform: translateY(-100%);
}

.header__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) 0;
    min-height: 80px;
}

.header__logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--gray-900);
    text-decoration: none;
}

.header__logo-img {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    object-fit: contain;
}

.header__logo-text {
    color: var(--gray-900);
}

.header__nav {
    display: flex;
    align-items: center;
    gap: var(--space-8);
}

.nav__list {
    display: flex;
    align-items: center;
    gap: var(--space-6);
}

.nav__item {
    position: relative;
}

.nav__link {
    font-weight: 500;
    color: var(--gray-700);
    transition: var(--transition-fast);
    position: relative;
    padding: var(--space-2) 0;
    text-decoration: none;
}

.nav__link:hover,
.nav__link--active {
    color: var(--primary);
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: var(--transition-fast);
}

.nav__link:hover::after,
.nav__link--active::after {
    width: 100%;
}

.header__cta {
    margin-left: var(--space-4);
}

.header__mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: var(--space-2);
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-toggle__line {
    width: 24px;
    height: 2px;
    background-color: var(--gray-700);
    transition: var(--transition-fast);
}

/* ===== CUSTOM FONT STYLING FOR HEADER & FOOTER ===== */

/* --- Header Logo Text --- */
.header__logo-text {
    font-family: 'Cochocib Script Latin Pro', cursive;
    font-size: 28px;
    /* Suitable size for the header */
    font-weight: normal;
    /* Script fonts look best at normal weight */
    color: var(--gray-900);
    line-height: 1;
}

/* --- Mobile Menu Logo Text --- */
.mobile-nav__logo span {
    font-family: 'Cochocib Script Latin Pro', cursive;
    font-size: 24px;
    font-weight: normal;
    color: var(--gray-900);
}

/* --- Footer Logo Text --- */
.footer__title {
    font-family: 'Cochocib Script Latin Pro', cursive;
    font-size: 32px;
    /* Slightly larger for emphasis in the footer */
    font-weight: normal;
    line-height: 1;
    margin: 0;
}

/* --- General Adjustments for Logo-Free Layout --- */
.header__logo,
.mobile-nav__logo,
.footer__logo {
    gap: 0;
    /* Remove the gap that was intended for the image */
    align-items: center;
}

/* ===== MOBILE NAVIGATION ===== */
.mobile-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    height: 100vh;
    background-color: var(--white);
    z-index: var(--z-mobile-nav);
    transform: translateX(100%);
    transition: var(--transition);
    box-shadow: var(--shadow-xl);
    overflow-y: auto;
}

.mobile-nav--open {
    transform: translateX(0);
}

.mobile-nav__overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: var(--z-overlay);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.mobile-nav__overlay--visible {
    opacity: 1;
    visibility: visible;
}

.mobile-nav__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) var(--space-6);
    border-bottom: 1px solid var(--gray-200);
}

.mobile-nav__logo {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-weight: 600;
    color: var(--gray-900);
    text-decoration: none;
}

.mobile-nav__logo img {
    width: 32px;
    height: 32px;
    border-radius: var(--radius);
}

.mobile-nav__close {
    padding: var(--space-2);
    color: var(--gray-700);
    font-size: var(--text-xl);
}

.mobile-nav__list {
    padding: var(--space-6);
}

.mobile-nav__item {
    margin-bottom: var(--space-2);
}

.mobile-nav__link {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) 0;
    font-size: var(--text-lg);
    font-weight: 500;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-100);
    transition: var(--transition-fast);
    text-decoration: none;
}

.mobile-nav__link:hover,
.mobile-nav__link--active {
    color: var(--primary);
}

.mobile-nav__link i {
    width: 20px;
    text-align: center;
}

.mobile-nav__footer {
    padding: var(--space-6);
    border-top: 1px solid var(--gray-200);
    margin-top: auto;
}

.mobile-nav__social {
    display: flex;
    gap: var(--space-3);
    justify-content: center;
}

.mobile-nav__social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--gray-100);
    color: var(--gray-600);
    border-radius: var(--radius);
    transition: var(--transition-fast);
}

.mobile-nav__social-link:hover {
    background-color: var(--primary);
    color: var(--white);
}

/* ===== HERO SECTIONS ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    text-align: center;
    overflow: hidden;
    margin-top: 80px;
}

.hero--home {
    margin-top: 0;
}

.hero__video-background {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

/* --- YouTube Player Styles --- */
#youtube-player-container {
    position: relative;
    /* Needed to position the play button */
    cursor: pointer;
}

#youtube-player-container .play-button-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    /* Adds a slight dark tint */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

#youtube-player-container:hover .play-button-overlay {
    background-color: rgba(0, 0, 0, 0.5);
    /* Darkens on hover */
}

#youtube-player-container .play-button-overlay i {
    font-size: 50px;
    color: white;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

#youtube-player-container:hover .play-button-overlay i {
    transform: scale(1.1);
    background-color: var(--primary);
    /* Uses your site's primary green color */
}

.hero__background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.1;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.hero__content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 var(--space-6);
}

.hero__title {
    font-size: var(--text-6xl);
    font-weight: 700;
    margin-bottom: var(--space-6);
    color: var(--white);
}

.hero__subtitle {
    font-size: var(--text-xl);
    margin-bottom: var(--space-8);
    opacity: 0.9;
    color: var(--white);
}

.hero__actions {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== PAGE HERO ===== */
.page-hero {
    position: relative;
    height: 60vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    text-align: center;
    margin-top: 80px;
    overflow: hidden;
}

.page-hero__background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.2;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.page-hero__content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 var(--space-6);
}

.page-hero__title {
    font-size: var(--text-5xl);
    font-weight: 700;
    margin-bottom: var(--space-4);
    color: var(--white);
}

.page-hero__subtitle {
    font-size: var(--text-lg);
    opacity: 0.9;
    margin-bottom: var(--space-6);
    color: var(--white);
}

/* ===== MAIN CONTENT ===== */
.main {
    min-height: calc(100vh - 80px);
}

/* ===== FOOTER ===== */
.footer {
    background-color: var(--gray-900);
    color: var(--white);
    padding: var(--space-20) 0 var(--space-8);
    margin-top: var(--space-200);
}

.footer__content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-8);
    margin-bottom: var(--space-8);
}

.footer__section h3,
.footer__section h4 {
    color: var(--white);
    margin-bottom: var(--space-4);
}

.footer__subtitle {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--white);
    margin-bottom: var(--space-4);
}

.footer__description {
    color: var(--gray-300);
    line-height: 1.6;
    margin-bottom: var(--space-4);
}

.footer__logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.footer__logo-img {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
}

.footer__title {
    color: var(--white);
    margin: 0;
}

.footer__social {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-4);
}

.footer__social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--gray-800);
    color: var(--gray-300);
    border-radius: var(--radius);
    transition: var(--transition-fast);
}

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

.footer__list {
    list-style: none;
}

.footer__list li {
    margin-bottom: var(--space-2);
}

.footer__link {
    color: var(--gray-300);
    transition: var(--transition-fast);
    text-decoration: none;
}

.footer__link:hover {
    color: var(--primary);
}

.footer__contact {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.contact__item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    color: var(--gray-300);
}

.contact__item i {
    color: var(--primary);
    width: 16px;
}

.contact__item a {
    color: var(--gray-300);
    transition: var(--transition-fast);
}

.contact__item a:hover {
    color: var(--primary);
}

.footer__bottom {
    border-top: 1px solid var(--gray-800);
    padding-top: var(--space-6);
    margin-top: var(--space-8);
}

.footer__bottom-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-4);
}

.footer__copyright {
    color: var(--gray-400);
}

.footer__tagline {
    font-size: var(--text-sm);
    margin-top: var(--space-1);
    margin-bottom: 0;
}

.footer__legal {
    display: flex;
    gap: var(--space-4);
}

.footer__legal-link {
    color: var(--gray-400);
    font-size: var(--text-sm);
    transition: var(--transition-fast);
}

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

/* ===== BACK TO TOP ===== */
.back-to-top {
    position: fixed;
    bottom: var(--space-6);
    right: var(--space-6);
    width: 50px;
    height: 50px;
    background-color: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    z-index: var(--z-header);
}

.back-to-top--visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

/* ===== UTILITIES ===== */
.mb-0 {
    margin-bottom: 0 !important;
}

.mb-2 {
    margin-bottom: var(--space-2);
}

.mb-4 {
    margin-bottom: var(--space-4);
}

.mb-6 {
    margin-bottom: var(--space-6);
}

.mb-8 {
    margin-bottom: var(--space-8);
}

.mt-0 {
    margin-top: 0 !important;
}

.mt-2 {
    margin-top: var(--space-2);
}

.mt-4 {
    margin-top: var(--space-4);
}

.mt-6 {
    margin-top: var(--space-6);
}

.mt-8 {
    margin-top: var(--space-8);
}

.hidden {
    display: none !important;
}

.block {
    display: block !important;
}

.flex {
    display: flex !important;
}

.grid {
    display: grid !important;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .container {
        padding: 0 var(--space-4);
    }

    .hero__title {
        font-size: var(--text-5xl);
    }

    .page-hero__title {
        font-size: var(--text-4xl);
    }
}

@media (max-width: 768px) {
    .header__nav {
        display: none;
    }

    .header__mobile-toggle {
        display: flex;
    }

    .hero {
        min-height: 80vh;
    }

    .hero__title {
        font-size: var(--text-4xl);
    }

    .page-hero {
        height: 50vh;
        min-height: 400px;
    }

    .page-hero__title {
        font-size: var(--text-3xl);
    }

    .section {
        padding: var(--space-16) 0;
    }

    .hero__actions {
        flex-direction: column;
        align-items: center;
    }

    .footer__bottom-content {
        flex-direction: column;
        text-align: center;
    }

    .footer__legal {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-3);
    }

    .hero__title {
        font-size: var(--text-3xl);
    }

    .page-hero__title {
        font-size: var(--text-2xl);
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .hero__actions .btn {
        width: auto;
        min-width: 200px;
    }

    .mobile-nav {
        width: 100%;
    }
}

/* ===== LOADING STATES ===== */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-full);
    border-top-color: var(--primary);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* In main.css */

/* Remove margin-top from footer when it directly follows the full-width CTA */
.cta+#footer-placeholder {
    margin-top: 0;
}