@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #1e3a5f; /* Teal */
    --primary-light: #c5d2da;
    --secondary: #c9a87c; /* Amber */
    --accent: #7d8fa3; /* Pinkish-Red for accents */
    --bg-dark: #1e3a5f;
    --bg-light: #f5efe6;
    --text-main: #2a2a2a;
    --text-muted: #7a6f63;
    --glass: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --neutral-dark: #1e3a5f;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3 {
    font-weight: 700;
    line-height: 1.2;
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.reveal {
    animation: fadeInUp 0.8s ease forwards;
}

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 2rem;
    transition: var(--transition);
}

header.scrolled {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    padding: 0.75rem 2rem;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Language Selector */
.language-selector {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.lang-btn {
    width: 36px;
    height: 24px;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    padding: 0;
    background: transparent;
    transition: var(--transition);
    opacity: 0.6;
}

.lang-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.lang-btn:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

.lang-btn.active {
    opacity: 1;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(30, 58, 95, 0.3);
}

header.scrolled .lang-btn {
    background: rgba(255, 255, 255, 0.9);
}

nav a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

nav a:hover {
    color: var(--primary);
}

.nav-btn {
    background: var(--primary);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
}

.nav-btn:hover {
    background: #2a4a6a;
    color: white;
    transform: scale(1.05);
}

/* Hero Section */
.hero {
    height: 100vh; /* Fixed height to fit screen */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-top: 80px; /* Reduced padding for more space */
    background: linear-gradient(135deg, #f5efe6 0%, #fff 100%);
    overflow: hidden; /* Prevent scrolling in this section */
}

.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-top: 60px; /* Minimal padding for maximum content size */
    background: linear-gradient(135deg, #f5efe6 0%, #fff 100%);
    overflow: hidden;
}

.hero-content {
    max-width: 1400px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1.2fr; /* More space for the image */
    gap: 5rem;
    align-items: center;
}

.hero-text h1 {
    font-size: 3.8rem; /* Adjusted for long title */
    color: var(--text-main);
    margin-bottom: 2rem;
    line-height: 1.15;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.hero-text h1 .highlight {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.hero-text h1 span {
    color: var(--primary);
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-text p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero-image {
    position: relative;
    border-radius: 2rem;
    box-shadow: var(--shadow-lg);
    transform: rotate(2deg);
    max-height: 85vh; /* Maximum vertical scale */
    display: flex;
    align-items: center;
}

.hero-image img {
    width: auto;
    max-width: 100%;
    max-height: 85vh;
    display: block;
    border-radius: 2rem;
    object-fit: cover;
    transition: var(--transition);
}

.hero-image:hover img {
    transform: scale(1.05);
}

/* Stats Container */
.hero-stats {
    position: absolute;
    bottom: 4rem;
    left: -4rem;
    background: white;
    padding: 2.5rem 3.5rem; /* Ultra-large padding */
    border-radius: 2rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    gap: 3.5rem;
    transform: rotate(-2deg);
    z-index: 10;
}

.stat-item h3 {
    font-size: 3rem; /* Huge numbers for maximum visibility */
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-item p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

/* Sections General */
section {
    padding: 8rem 2rem;
}

.container {
    max-width: 1400px; /* Expanded for more horizontal presence */
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.section-header h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.125rem;
    max-width: 700px;
    margin: 0 auto;
}

/* Philosophy Section */
.philosophy {
    background-color: white;
}

.philosophy-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.phil-image {
    background: var(--primary-light);
    border-radius: 2rem;
    height: 500px;
    position: relative;
}

.phil-card {
    position: absolute;
    bottom: 2rem;
    right: -2rem;
    background: white;
    padding: 2.5rem;
    border-radius: 1.5rem;
    box-shadow: var(--shadow-lg);
    max-width: 350px;
}

/* Cards & Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: white;
    padding: 3rem;
    border-radius: 2rem;
    border: 1px solid var(--bg-light);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.service-card icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    display: block;
}

/* Bento Grid for Values */
.values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 200px;
    gap: 1.5rem;
}

.value-card {
    background: white;
    padding: 2rem;
    border-radius: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    transition: var(--transition);
    cursor: default;
}

.value-card:hover {
    background: var(--primary);
    color: white;
}

.value-card h3 {
    margin: 0;
    font-size: 1.25rem;
}

.v-tall { grid-row: span 2; }
.v-wide { grid-column: span 2; }

.bg-teal { background: var(--primary); color: white; }
.bg-amber { background: var(--secondary); color: white; }

/* Contact & Footer */
footer {
    background: var(--bg-dark);
    color: white;
    padding: 6rem 2rem 2rem;
}

.footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-info h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.contact-pill {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    margin-bottom: 1rem;
    text-decoration: none;
    color: white;
    transition: var(--transition);
}

.contact-pill:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Pillar Cards with soft colors */
.pillar-card {
    position: relative;
    overflow: hidden;
}

.pillar-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pillar-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

.pillar-card:hover::before {
    opacity: 1;
}

/* Responsive */
@media (max-width: 968px) {
    .hero-content, .philosophy-grid {
        grid-template-columns: 1fr;
    }
    .hero-text h1 { font-size: 2.8rem; }
    .hero-stats { position: static; transform: none; margin-top: 2rem; }
    .values-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
    .values-grid { grid-template-columns: 1fr; }
    .v-wide { grid-column: span 1; }
    nav ul { display: none; }

    /* Header móvil - logo y banderas en la misma línea pegados */
    #header { padding: 0.75rem 0.5rem !important; }
    nav {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.5rem !important;
    }
    .logo { 
        font-size: 0.9rem !important; 
        gap: 0.3rem !important; 
        order: 1 !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }
    .logo i { width: 20px !important; height: 20px !important; }
    .nav-right { 
        order: 2 !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 0.25rem !important;
        margin: 0 !important;
        width: auto !important;
        flex-shrink: 0 !important;
    }
    .nav-right ul { display: none !important; }
    .nav-right .nav-btn { display: none !important; }
    .language-selector { 
        display: flex !important;
        gap: 0.25rem !important;
        margin: 0 !important;
    }
    .lang-btn { width: 28px !important; height: 20px !important; }

    /* Hero móvil */
    .hero-text h1 { font-size: 1.5rem !important; line-height: 1.25; margin-bottom: 0.75rem !important; }
    .hero-text p { font-size: 1rem !important; margin-bottom: 1.5rem !important; line-height: 1.5 !important; }
    .hero-text { padding: 0 1rem; }
    .hero { padding-top: 180px !important; padding-bottom: 2rem !important; }
    .hero-text > div[style*="display: flex"] {
        flex-direction: column !important;
        gap: 0.75rem !important;
        padding: 0 0.5rem;
    }
    .hero-text > div[style*="display: flex"] > a {
        width: calc(100% - 1rem) !important;
        max-width: 280px !important;
        margin: 0 auto !important;
        justify-content: center !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }
    .hero-stats { 
        display: none !important;
    }

    /* Grillas móvil - una columna */
    .pillars-grid { grid-template-columns: 1fr !important; gap: 1rem; }
    .values-list { grid-template-columns: 1fr !important; }
    .mvv-grid { grid-template-columns: 1fr !important; gap: 1.5rem; }
    .about-grid { grid-template-columns: 1fr !important; gap: 1rem; }
    .services-grid { grid-template-columns: 1fr !important; gap: 1rem; }
    .footer-grid { grid-template-columns: 1fr !important; gap: 2rem; text-align: center; }

    /* Tarjetas móvil */
    .pillar-card, .value-item, .mvv-card, .about-card { padding: 1.5rem !important; }
    .service-card { padding: 1.5rem !important; }

    /* Ocultar cartel Próximamente en móvil */
    #proximamente-banner {
        display: none !important;
    }

    /* Imágenes móvil */
    .sobrenos-image img, .mvv-image img {
        border-radius: 1rem !important;
    }

    /* Contacto móvil */
    .contact-pill { padding: 1rem 1.25rem !important; margin-bottom: 0.75rem; }
    .contact-pill p { font-size: 1rem !important; }

    /* Footer bottom móvil */
    footer > div:last-child {
        flex-direction: column !important;
        text-align: center;
        gap: 1rem !important;
    }

    /* Villa section móvil */
    #villa { height: 400px !important; }
    #villa h2 { font-size: 2rem !important; }
    #villa p { font-size: 1rem !important; }
}
