/* ==================================
   VARIABLES & DESIGN TOKENS
   ================================== */
:root {
    /* Colors Premium basats en el Logo Oficial (Teal/Verd-Mar) */
    --primary: #12a298; /* Teal Oficial Logo */
    --primary-glow: rgba(18, 162, 152, 0.4);
    --secondary: #f43f5e; /* Rose 500 per accent/contrast explosiu */
    --dark: #09090b; /* Zinc 950 (Fons gairebé pur negre per seccions fosques) */
    --dark-muted: #3f3f46; /* Zinc 700 */
    --light: #f8fafc;
    --light-muted: #e2e8f0;
    --white: #ffffff;
    
    --font-sans: 'Outfit', sans-serif;
    --font-serif: 'Playfair Display', serif;

    --radius-lg: 1.25rem;
    --radius-round: 9999px;

    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.05);
    --border-glass: 1px solid rgba(255, 255, 255, 0.2);
    --bg-glass: rgba(255, 255, 255, 0.7);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--dark);
    background-color: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Typography */
h1, h2, h3 {
    line-height: 1.2;
    margin-bottom: 1rem;
}

.section-title {
    font-family: var(--font-serif);
    font-size: 3rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, var(--dark) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.text-light {
    background: none;
    -webkit-text-fill-color: var(--white);
    color: var(--white);
}

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

/* Buttons */
.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-round);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-family: inherit;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

.btn-secondary {
    background: var(--white);
    color: var(--dark);
    border: 1px solid var(--light-muted);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.w-100 { width: 100%; }

/* Glass Header */
.glass-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: var(--border-glass);
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.glass-header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    text-decoration: none;
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark);
}

.logo-text { color: var(--primary); }

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark-muted);
    font-weight: 600;
    transition: color 0.3s;
}

.nav-links a:hover { color: var(--primary); }
.nav-links .btn-primary { color: white; padding: 0.5rem 1.25rem; }
.nav-links .btn-primary:hover { color: white; }

.mobile-menu-icon {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1100;
}

.mobile-menu-icon span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--dark);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Hamburger to X animation */
.mobile-menu-icon.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.mobile-menu-icon.active span:nth-child(2) { opacity: 0; }
.mobile-menu-icon.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

/* Hero */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding-top: 5rem;
}

.hero-bg-shapes .shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.6;
}

.shape-1 {
    top: -10%; left: -10%;
    width: 600px; height: 600px;
    background: #e0e7ff;
}

.shape-2 {
    bottom: -20%; right: -10%;
    width: 500px; height: 500px;
    background: #fdf2f8;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: 5.5rem;
    color: var(--dark);
    line-height: 1.05;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
    animation: fadeUp 1s ease forwards;
    background: linear-gradient(135deg, var(--dark) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-title span { color: var(--primary); }

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--dark-muted);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    animation: fadeUp 1s 0.2s ease forwards;
    opacity: 0;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    animation: fadeUp 1s 0.4s ease forwards;
    opacity: 0;
}

/* Sections */
.section { padding: 6rem 0; }
.dark-section { background-color: var(--dark); color: var(--white); }
.dark-section .glass-card {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}
.bg-gradient { background: linear-gradient(to bottom, var(--white) 0%, #f1f5f9 100%); }

/* Cards (Glassmorphism) */
.grid {
    display: grid;
    gap: 2rem;
}

.cards-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.glass-card {
    background: var(--bg-glass);
    border: var(--border-glass);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-glass);
    overflow: hidden;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease, border-color 0.4s ease;
    position: relative;
}

.glass-card:hover { 
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 20px 40px var(--primary-glow);
    border-color: rgba(18, 162, 152, 0.3);
}

.card-tag {
    position: absolute;
    top: 1rem; right: 1rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-round);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--primary);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.card-img {
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.card-body { padding: 2rem; }
.card-body p { color: var(--dark-muted); margin-bottom: 1.5rem; }

.card-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 800;
}

/* Gallery Scroller */
.gallery-scroller::-webkit-scrollbar {
    display: none;
}
.text-left { text-align: left !important; }
.overflow-hidden { overflow-x: hidden; }

.gallery-nav-btn {
    position: absolute;
    top: calc(50% - 1rem);
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: var(--dark);
    color: var(--white);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    transition: all 0.3s ease;
}
.gallery-nav-btn:hover { background: var(--primary); transform: translateY(-50%) scale(1.1); border-color: var(--primary); }
.left-btn { left: 4%; }
.right-btn { right: 4%; }
@media (max-width: 768px) { .gallery-nav-btn { display: none; } }

/* Timeline */
.timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0; bottom: 0; left: 1rem;
    width: 2px;
    background: rgba(255, 255, 255, 0.1);
}

.timeline-item {
    position: relative;
    padding-left: 3rem;
    margin-bottom: 3rem;
}

.timeline-dot {
    position: absolute;
    left: 0.6rem; top: 0.2rem;
    width: 1rem; height: 1rem;
    border-radius: 50%;
    background: var(--secondary);
    box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.2);
}

.timeline-content h4 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.timeline-content p { color: #cbd5e1; }

/* Forms */
.form-container {
    max-width: 500px;
    margin: 0 auto;
    text-align: left;
}

.glass-panel {
    background: var(--bg-glass);
    border: var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 3rem;
    box-shadow: var(--shadow-glass);
}

.form-group { margin-bottom: 1.5rem; }
.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-muted);
}

.form-group input, .form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--light-muted);
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.5);
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Form states */
.loader {
    border: 3px solid rgba(255,255,255,0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

.form-message {
    margin-top: 1rem;
    text-align: center;
    font-weight: 600;
    border-radius: 0.5rem;
    padding: 0.75rem;
    display: none;
}
.form-message.success {
    display: block;
    background: #dcfce7;
    color: #166534;
}
.form-message.error {
    display: block;
    background: #fee2e2;
    color: #991b1b;
}

/* Footer */
footer {
    background: var(--dark);
    color: white;
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand h3 {
    font-family: var(--font-serif);
    color: var(--white);
}

.socials a {
    color: var(--primary);
    text-decoration: none;
}

.logos-grid {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.logo-box {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.copy {
    text-align: center;
    color: #94a3b8;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
}

/* Animations */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Checkbox & RGPD */
.checkbox-group label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.85rem;
    font-weight: normal;
    color: var(--dark-muted);
    cursor: pointer;
    line-height: 1.4;
}
.checkbox-group input { width: auto; margin-top: 0.25rem; }
.checkbox-group a { color: var(--primary); text-decoration: underline; }

/* Legal Links Footer */
.legal-link { color: #94a3b8; text-decoration: none; font-size: 0.85rem; transition: color 0.3s; padding: 0 0.5rem; }
.legal-link:hover { color: var(--white); }
.copy { line-height: 1.8; margin-top: 2rem; }

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: rgba(15, 23, 42, 0.95);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 9999;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    flex-wrap: wrap;
    gap: 1rem;
}
.cookie-banner p { margin: 0; font-size: 0.9rem; }
.cookie-banner a { color: var(--primary); text-decoration: underline; }

/* Responsive */
@media (max-width: 768px) {
    .hero-title { font-size: 3rem; }
    .hero-actions { flex-direction: column; }
    
    .mobile-menu-icon { display: flex; }
    
    .nav-links {
        position: fixed;
        top: 0; right: -100%;
        width: 80%;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        justify-content: center;
        gap: 2rem;
        padding: 2rem;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
        z-index: 1050;
    }

    .nav-links.active { right: 0; }
    
    .footer-content { grid-template-columns: 1fr; }
    .cookie-banner { flex-direction: column; text-align: center; }
}
