/*
  style.css
  Theme: Top 7 Must-Visit Tourist Destinations in Ecuador
  Design System: Brutalism with Skewed Grids
  Color Scheme: Pastel
  Animation Style: Microanimations
*/

/* 1. CSS VARIABLES & ROOT SETUP
-------------------------------------------------- */
:root {
    /* Fonts */
    --font-heading: 'Archivo Black', 'Arial Black', sans-serif;
    --font-body: 'Roboto', 'Helvetica', sans-serif;

    /* Pastel Color Palette */
    --color-text-dark: #222222;
    --color-bg-main: #FFF9E8; /* Pastel BG */
    --color-bg-alt: #FBF8CC;  /* Pastel Yellow */
    --color-primary: #F1C0E8; /* Pastel Pink */
    --color-secondary: #CFBAF0;/* Pastel Lavender */
    --color-accent1: #A3C4F3;  /* Pastel Blue */
    --color-accent2: #90DBF4;  /* Pastel Sky */
    --color-accent3: #B9FBC0;  /* Pastel Mint */
    --color-white: #FFFFFF;
    --color-black: #000000;

    /* Brutalist Elements */
    --border-main: 2px solid var(--color-black);
    --shadow-brutal-sm: 4px 4px 0 var(--color-black);
    --shadow-brutal-md: 8px 8px 0 var(--color-black);
    --shadow-brutal-lg: 12px 12px 0 var(--color-black);
}

/* 2. BASE & TYPOGRAPHY STYLES
-------------------------------------------------- */
body {
    font-family: var(--font-body);
    background-color: var(--color-bg-main);
    color: var(--color-text-dark);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-text-dark);
    letter-spacing: -0.02em;
}

/* Helper for text shadows, enhancing readability */
.text-shadow-heavy {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}
.text-shadow-light {
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.1);
}

/* 3. HEADER & NAVIGATION
-------------------------------------------------- */
#header {
    transition: background-color 0.3s ease-in-out;
}

/* Mobile Menu - shown/hidden via JS */
#mobile-menu.hidden {
    display: none;
}
#mobile-menu {
    animation: fadeIn 0.3s ease-in-out;
}
.menu-link {
    transition: color 0.3s;
}
.menu-link:hover {
    color: var(--color-primary);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 4. HERO SECTION
-------------------------------------------------- */
#hero {
    color: var(--color-white); /* Enforce white text for readability */
}

#hero-bg {
    transition: transform 0.3s ease-out;
}

/* 5. GLOBAL COMPONENT STYLES
-------------------------------------------------- */

/* Global Button Styles */
button,
a.button,
input[type="submit"] {
    display: inline-block;
    font-family: var(--font-heading);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease-out;
    border: var(--border-main);
    padding: 0.75rem 1.5rem;
}

button:hover,
a.button:hover,
input[type="submit"]:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-brutal-sm);
}

button:active,
a.button:active,
input[type="submit"]:active {
    transform: translate(2px, 2px);
    box-shadow: none !important;
}

/* Global Card Styles */
.card {
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card-image {
    width: 100%;
    height: 250px; /* Fixed height for consistency */
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image covers the area without distortion */
    transition: transform 0.4s ease-in-out;
}

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

.card-content {
    flex-grow: 1; /* Allows content to fill remaining space */
    padding-top: 1rem;
    text-align: left;
}

/* Form Styles */
input[type="text"],
input[type="email"],
textarea {
    border: var(--border-main);
    padding: 0.75rem 1rem;
    width: 100%;
    transition: box-shadow 0.2s ease;
    background-color: var(--color-bg-alt);
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--color-primary);
}

/* 6. SECTION-SPECIFIC STYLES
-------------------------------------------------- */

/* Skewed Section Wrapper */
#destinos {
    background-color: var(--color-bg-alt);
}
#destinos > div {
    /* This is the skewed container */
    background-color: inherit;
}

/* Timeline from Success Stories */
.right-timeline, .left-timeline {
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

/* Sustainability Toggle Switch */
.dot {
    transition: transform 0.3s ease-in-out;
}
input:checked ~ .dot {
    transform: translateX(100%);
    background-color: var(--color-accent3);
}

/* External Resources Section */
.resource-card a:first-of-type {
    text-decoration: none;
    color: var(--color-text-dark);
}
.resource-card a:first-of-type:hover {
    text-decoration: underline;
}
.resource-card a.font-bold {
    display: inline-block;
    position: relative;
    transition: color 0.3s ease;
}
.resource-card a.font-bold::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--color-text-dark);
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}
.resource-card a.font-bold:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* 7. FOOTER
-------------------------------------------------- */
footer a {
    transition: color 0.3s ease;
}

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

footer .flex a { /* Social media text links */
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
}


/* 8. PAGE-SPECIFIC STYLES
-------------------------------------------------- */

/* Success Page - Centered Content */
body.page-success {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

/* Privacy & Terms Pages - Header Offset */
body.page-legal main {
    padding-top: 120px;
}

/* 9. GSAP/ANIMATION DEFAULTS
   Classes for GSAP to target. The animations themselves are in script.js
-------------------------------------------------- */
.gsap-fade-in,
.gsap-card,
.gsap-timeline-item {
    opacity: 0;
    transform: translateY(30px);
}