/* --- STYLE.CSS VERSION 6 (EXPERT GRID SYSTEM) --- */
:root {
    --primary: #00ADEF;
    /* Renovación Light Blue */
    --primary-dark: #00567a;
    /* Deep Navy */
    --accent: #FFD400;
    /* Official Yellow */
    --dark: #0d1b2a;
    /* Midnight Blue */
    --light: #f8fafc;
    /* Slate 50 */
    --white: #ffffff;
    /* Expert Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    /* Typography */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
}
/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html {
    font-size: 16px;
    scroll-behavior: smooth;
}
body {
    font-family: var(--font-body);
    background-color: var(--light);
    color: #334155;
    line-height: 1.6;
}
/* --- HEADER --- */
header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    border-bottom: 3px solid var(--accent);
    position: sticky;
    top: 0;
    z-index: 9999;
    box-shadow: var(--shadow-sm);
}
.navbar {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 2rem;
}
.logo img {
    height: 45px;
    width: auto;
    transition: transform 0.3s;
}
.logo:hover img {
    transform: scale(1.05);
}
.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}
.nav-links a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 700;
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-size: 0.85rem;
    transition: color 0.2s;
}
.nav-links a:hover {
    color: var(--primary);
}
.btn-nav {
    background: var(--primary);
    color: white !important;
    padding: 0.6rem 1.5rem;
    border-radius: 6px;
    box-shadow: 0 4px 14px rgba(0, 173, 239, 0.3);
    transition: transform 0.2s, background 0.2s;
}
.btn-nav:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}
/* --- HERO SECTION --- */
.hero {
    min-height: 85vh;
    background: linear-gradient(135deg, rgba(13, 27, 42, 0.9), rgba(13, 27, 42, 0.8)), url('imagenes/rafa-portada.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    padding: 2rem;
}
.hero-content {
    max-width: 900px;
    animation: fadeIn 1s ease-out;
}
.hero h1 {
    font-size: 4.5rem;
    font-family: var(--font-heading);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: -webkit-linear-gradient(#fff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.badge {
    background: var(--accent);
    color: var(--dark);
    padding: 0.4rem 1rem;
    font-weight: 800;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    display: inline-block;
}
/* --- SECTIONS --- */
.proposals {
    padding: 6rem 0;
    background: #fff;
}
/* Main Container for Grid */
.category-block {
    width: 95%;
    max-width: 1800px;
    margin: 0 auto 5rem;
}
.category-title {
    font-size: 2.2rem;
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--primary-dark);
    text-transform: uppercase;
    padding-left: 1.5rem;
    border-left: 10px solid var(--accent);
    margin-bottom: 3rem;
}
/* --- EXPERT GRID SYSTEM (Mobile First Cascade) --- */
.grid-container {
    display: grid;
    gap: 2.5rem;
    /* 1. Mobile Default (< 768px) */
    grid-template-columns: 1fr;
}
/* 2. Tablet (>= 768px) -> 2 Columns */
@media (min-width: 768px) {
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
}
/* 3. Laptop Standard (>= 1024px) -> 4 Columns [REQUESTED] */
@media (min-width: 1024px) {
    .grid-container {
        grid-template-columns: repeat(4, 1fr);
    }
}
/* 4. Large Screens / TV (>= 1600px) -> 6 Columns [REQUESTED] */
@media (min-width: 1600px) {
    .grid-container {
        grid-template-columns: repeat(6, 1fr);
        gap: 2rem;
    }
}
/* --- CARD COMPONENT --- */
.card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    height: 100%;
}
.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary);
}
/* CARD IMAGE AESTHETICS */
.card-img {
    width: 100%;
    /* Aspect Ratio 4:5 for Vertical Flyers */
    aspect-ratio: 4 / 5;
    background: #0f172a;
    /* Dark Elegant Background */
    position: relative;
    overflow: hidden;
}
.card-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* CRITICAL: Show full flyer without crop */
    transition: transform 0.5s ease;
}
.card:hover .card-img img {
    transform: scale(1.02);
}
.card-body {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.card-body h3 {
    font-size: 1.1rem;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--dark);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    line-height: 1.4;
}
.card-body p {
    font-size: 0.95rem;
    color: #64748b;
    flex-grow: 1;
    margin-bottom: 1.5rem;
}
.btn-link {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}
/* --- RESPONSIVE TYPOGRAPHY --- */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.8rem;
    }
    .nav-links {
        display: none;
    }
    /* Mobile Menu implementation if needed */
    .navbar {
        padding: 1rem;
    }
}
/* --- UTILS & KEYFRAMES --- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
footer {
    background: var(--dark);
    color: #cbd5e1;
    padding: 4rem 0;
    text-align: center;
}
/* --- MODAL SYSTEM --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 27, 42, 0.75);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeInModal 0.3s ease-out;
}
.modal-container {
    background: white;
    width: 100%;
    max-width: 650px;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    position: relative;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: slideUpModal 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #f1f5f9;
    border: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}
.modal-close:hover {
    background: #fee2e2;
    color: #ef4444;
}
.modal-content {
    padding: 2.5rem;
    overflow-y: auto;
}
#modal-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--primary-dark);
    margin-bottom: 1rem;
    padding-right: 2rem;
    line-height: 1.2;
}
#modal-text {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #334155;
    white-space: pre-wrap;
}
/* Animations */
@keyframes fadeInModal {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
@keyframes slideUpModal {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
body.modal-open {
    overflow: hidden;
}
/* --- MAGAZINE LAYOUT (BIO MODAL) --- */
.bio-container {
    max-width: 900px;
}
.mag-block {
    display: flow-root;
    /* Clearfix */
    margin-bottom: 2rem;
}
.mag-text {
    font-size: 1.05rem;
    line-height: 1.75;
    color: #334155;
    text-align: justify;
    /* Magazine look */
}
/* Mobile Default: Stacked */
.mag-img-right,
.mag-img-left {
    display: block;
    width: 100%;
    margin-bottom: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}
/* Desktop: Floated & Shaped */
@media (min-width: 768px) {
    .mag-img-right {
        float: right;
        width: 40%;
        margin-left: 2rem;
        margin-bottom: 1rem;
        shape-outside: url('https://obrasperu.live/imagenes/rafa-01.png');
        /* Shape source */
        shape-margin: 20px;
        shape-image-threshold: 0.1;
    }
    .mag-img-left {
        float: left;
        width: 40%;
        margin-right: 2rem;
        margin-bottom: 1rem;
        shape-outside: url('https://obrasperu.live/imagenes/rafa-02.png');
        /* Shape source */
        shape-margin: 20px;
        shape-image-threshold: 0.1;
    }
}
/* --- INTERACTIVE PROFILE (SHAPE-OUTSIDE) --- */
.profile-section {
    position: relative;
    padding: 4rem 2rem;
    overflow: hidden;
    background: #fff;
    max-width: 1200px;
    margin: 0 auto;
}
.profile-container {
    display: flow-root;
    /* Clearfix */
}
.profile-image-shape {
    /* Mobile First: Stacked */
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 2rem;
    border-radius: 20px;
}
.profile-text-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #334155;
    text-align: left;
}
.profile-text-content h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}
.profile-text-content p {
    margin-bottom: 1.5rem;
}
/* DESKTOP / LARGE TABLET LAYOUT */
@media (min-width: 900px) {
    .profile-section {
        padding: 6rem 4rem;
    }
    .profile-image-shape {
        float: right;
        /* Image to the right */
        width: 50%;
        /* Larger for better impact */
        height: auto;
        shape-outside: url('imagenes/rafa_silueta_fixed.png');
        shape-image-threshold: 0.1;
        shape-margin: 30px;
        /* Adjusted for better flow */
        margin-left: 30px;
        margin-bottom: 20px;
        border-radius: 0;
        position: relative;
        z-index: 10;
        max-width: 550px;
    }
    .profile-text-content {
        font-size: 1.25rem;
    }
}
@media (min-width: 1600px) {
    .profile-image-shape {
        width: 40%;
        margin-right: -4rem;
    }
}