/* =============================================
   TABLE OF CONTENTS
   1.  CSS Variables & Root Styles
   2.  Global & Reset Styles
   3.  Typography
   4.  Layout & Utility Classes
   5.  Header & Navigation
   6.  Hero Section
   7.  Button Styles (Global)
   8.  Card Styles (Global)
   9.  Form Styles (Global)
   10. Methodology Section
   11. Portfolio Section
   12. Media (Gallery) Section
   13. Testimonials Section
   14. External Resources Section
   15. Contact Section
   16. Footer Section
   17. Special Pages (Success, Privacy, Terms)
   18. Animations & Transitions (Barba.js, ScrollReveal)
   19. Responsive Design (Media Queries)
============================================= */

/* 1. CSS Variables & Root Styles
--------------------------------------------- */
:root {
    /* Color Palette */
    --gradient-start: #6dd5ed;
    --gradient-end: #2193b0;
    --accent-color: #ffc371;
    --accent-color-darker: #e8a03d;
    --text-dark: #333333;
    --text-darker: #222222;
    --text-light: #ffffff;
    --bg-light: #f8f9fa;
    --bg-glass: rgba(255, 255, 255, 0.15);
    --border-color: rgba(255, 255, 255, 0.2);
    --shadow-color: rgba(0, 0, 0, 0.1);

    /* Typography */
    --font-primary: 'Playfair Display', serif;
    --font-secondary: 'Source Sans Pro', sans-serif;

    /* Sizing & Spacing */
    --header-height: 80px;
    --border-radius: 12px;
    --section-padding: 6rem 0;
    --box-shadow: 0 8px 32px 0 var(--shadow-color);
}

/* 2. Global & Reset Styles
--------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: var(--font-secondary);
    line-height: 1.7;
    color: var(--text-dark);
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    background-attachment: fixed;
    overflow-x: hidden;
}

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

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
}

/* 3. Typography
--------------------------------------------- */
h1, h2, h3, h4 {
    font-family: var(--font-primary);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-darker);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
}

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
}

/* 4. Layout & Utility Classes
--------------------------------------------- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section-padding {
    padding: var(--section-padding);
}

.glass-effect {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--box-shadow);
    padding: 2.5rem;
}

/* 5. Header & Navigation
--------------------------------------------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    transition: background-color 0.3s ease;
    border-bottom: 1px solid var(--border-color);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
}

.nav-logo {
    font-family: var(--font-primary);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-light);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.4);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    font-family: var(--font-secondary);
    font-weight: 600;
    color: var(--text-light);
    transition: color 0.3s ease;
    position: relative;
    padding-bottom: 0.5rem;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent-color);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease-out;
}

.nav-link:hover::after, .nav-link:focus::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.nav-link:hover, .nav-link:focus {
    color: var(--accent-color);
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--text-light);
    transition: all 0.3s ease-in-out;
}


/* 6. Hero Section
--------------------------------------------- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-light);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 0 1.5rem;
}

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

.hero-title {
    color: var(--text-light);
    font-size: 4.5rem;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2.5rem;
    font-weight: 400;
    opacity: 0.9;
}

/* 7. Button Styles (Global)
--------------------------------------------- */
.cta-button, .submit-button, .card-button {
    display: inline-block;
    padding: 0.8rem 2rem;
    font-family: var(--font-secondary);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-darker);
    background: var(--accent-color);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.cta-button:hover, .submit-button:hover, .card-button:hover {
    background: var(--accent-color-darker);
    color: var(--text-light);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.card-button {
    font-size: 0.9rem;
    padding: 0.6rem 1.5rem;
    margin-top: auto;
}

/* 8. Card Styles (Global)
--------------------------------------------- */
.card {
    background: var(--bg-light);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.15);
}

.card-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-title {
    color: var(--text-darker);
}

.card-description {
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

/* 9. Form Styles (Global)
--------------------------------------------- */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    position: relative;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.5);
    color: var(--text-dark);
    font-family: var(--font-secondary);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.contact-form label {
    position: absolute;
    top: 1rem;
    left: 1rem;
    color: var(--text-dark);
    opacity: 0.7;
    transition: all 0.3s ease;
    pointer-events: none;
}

.contact-form input:focus + label,
.contact-form input:not(:placeholder-shown) + label,
.contact-form textarea:focus + label,
.contact-form textarea:not(:placeholder-shown) + label {
    top: -0.75rem;
    left: 0.75rem;
    font-size: 0.85rem;
    color: var(--accent-color-darker);
    background: white;
    padding: 0 0.25rem;
    opacity: 1;
}

/* 10. Methodology Section
--------------------------------------------- */
.methodology-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.methodology-image {
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.methodology-text-container {
    color: var(--text-light);
}

.methodology-text-container h3,
.methodology-text-container p {
    color: var(--text-light);
}

/* 11. Portfolio Section
--------------------------------------------- */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* 12. Media (Gallery) Section
--------------------------------------------- */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    grid-auto-rows: 250px;
    grid-auto-flow: dense;
    gap: 1rem;
}

.gallery-item {
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item:nth-child(2) { grid-column: span 2; }
.gallery-item:nth-child(3) { grid-row: span 2; }
.gallery-item:nth-child(5) { grid-row: span 2; }

/* 13. Testimonials Section
--------------------------------------------- */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    color: var(--text-light);
    display: flex;
    flex-direction: column;
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: auto;
}

.author-photo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-color);
}

.author-name {
    color: var(--text-light);
    margin: 0;
}

.author-trip {
    color: var(--text-light);
    opacity: 0.8;
    font-size: 0.9rem;
    margin: 0;
}

/* 14. External Resources Section
--------------------------------------------- */
.resources-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    text-align: center;
}

.resource-link {
    padding: 2rem 1.5rem;
    color: var(--text-light);
    font-weight: 600;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.resource-link:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.25);
}

/* 15. Contact Section
--------------------------------------------- */
.contact-form-container {
    max-width: 800px;
    margin: 0 auto;
    color: var(--text-light);
}

.contact-intro {
    text-align: center;
    margin-bottom: 2rem;
}

/* 16. Footer Section
--------------------------------------------- */
.site-footer {
    background: #2c3e50;
    color: var(--text-light);
    padding: 4rem 0 2rem;
}

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

.footer-heading {
    color: var(--accent-color);
    font-family: var(--font-primary);
    margin-bottom: 1rem;
}

.footer-links li, .footer-socials li {
    margin-bottom: 0.5rem;
}

.footer-links a, .footer-socials a {
    color: var(--text-light);
    opacity: 0.8;
    transition: opacity 0.3s ease, color 0.3s ease;
}

.footer-links a:hover, .footer-socials a:hover {
    opacity: 1;
    color: var(--accent-color);
}

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

/* 17. Special Pages (Success, Privacy, Terms)
--------------------------------------------- */
.fullscreen-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
}

.fullscreen-page h1 {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.fullscreen-page p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.static-page-content {
    padding: calc(var(--header-height) + 4rem) 0 4rem;
    background: var(--bg-light);
}

.static-page-content .container {
    max-width: 800px;
}

/* 18. Animations & Transitions (Barba.js, ScrollReveal)
--------------------------------------------- */
.reveal {
    opacity: 1;
    transform: translateY(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Barba.js page transitions */
.barba-leave-active,
.barba-enter-active {
  transition: opacity 0.5s ease;
}
.barba-leave-to,
.barba-enter-from {
  opacity: 1;
}


/* 19. Responsive Design (Media Queries)
--------------------------------------------- */
@media (max-width: 992px) {
    h1 { font-size: 3rem; }
    .hero-title { font-size: 3.5rem; }
    .methodology-content { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 4rem 0;
    }
    .nav-menu {
        position: fixed;
        left: -100%;
        top: var(--header-height);
        flex-direction: column;
        background-color: #2c3e50;
        width: 100%;
        height: calc(100vh - var(--header-height));
        text-align: center;
        transition: 0.3s;
        gap: 2rem;
        padding-top: 3rem;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        margin: 1rem 0;
    }
    
    .hamburger {
        display: block;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 1;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    .hero-title { font-size: 2.8rem; }
    .hero-subtitle { font-size: 1.2rem; }

    .image-gallery {
        grid-template-columns: 1fr 1fr;
        grid-auto-rows: 200px;
    }
    .gallery-item:nth-child(n) {
        grid-column: auto;
        grid-row: auto;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    .image-gallery {
        grid-template-columns: 1fr;
    }
}