/* --- VARIABLES DE DISEÑO --- */
:root {
    --primary-color: #0f172a; 
    /* NUEVO AZUL  */
    --ortho-blue: rgba(6, 61, 239, 0.886);    
    --accent-color: #d4af37;  /* Dorado */
    --action-color: #00aeff;  
    
    --text-dark: #1e293b;
    --text-light: #94a3b8;
    --white: #ffffff;
    --bg-light: #f8fafc;
    --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
    --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

h1, h2, h3, .logo, .floating-gallery-btn, .btn-whatsapp-full {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }
html { scroll-behavior: smooth; }

.container { width: 90%; max-width: 1200px; margin: 0 auto; }

/* --- HEADER --- */
#navbar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 0.8rem 0; 
    position: fixed;
    width: 100%; top: 0; z-index: 1000;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.nav-container { display: flex; justify-content: space-between; align-items: center; }

/* LOGO DE LA BARRA (NUEVO AZUL) */
.logo { 
    font-size: 1.4rem; 
    color: var(--ortho-blue); 
    display: flex; align-items: center; gap: 10px; text-transform: uppercase; 
}
.nav-logo-img { height: 45px; width: auto; border-radius: 50%; }
.logo span { 
    color: var(--accent-color); font-size: 0.8rem; 
    background: rgba(212, 175, 55, 0.1); padding: 2px 8px; border-radius: 4px;
}

.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a { font-weight: 600; font-size: 0.9rem; color: var(--primary-color); }
.nav-links a:hover { color: var(--accent-color); }

.btn-nav { 
    background: var(--primary-color); color: var(--white) !important; 
    padding: 0.6rem 1.5rem; border-radius: 4px; box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.btn-nav:hover { background: var(--action-color); transform: translateY(-2px); }
.menu-toggle { display: none; cursor: pointer; font-size: 1.5rem; color: var(--primary-color); }

/* --- HERO --- */
.hero {
    height: 100vh;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.7) 100%), 
                url('https://images.unsplash.com/photo-1629909613654-28e377c37b09?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80') center/cover no-repeat;
    display: flex; align-items: center; position: relative; margin-top: 0;
}
.hero-content { position: relative; z-index: 2; color: var(--white); max-width: 800px; padding: 0 2rem; border-left: 5px solid var(--accent-color); }
.hero h1 { font-size: 3.5rem; line-height: 1.1; margin-bottom: 1.5rem; }
.hero p { font-size: 1.2rem; margin-bottom: 2rem; opacity: 0.9; font-weight: 300; }

.btn { display: inline-block; padding: 1rem 2.5rem; border-radius: 4px; font-weight: 700; transition: var(--transition); margin-right: 1rem; text-transform: uppercase; font-size: 0.8rem; letter-spacing: 1px; }
.btn-primary { background: var(--accent-color); color: var(--primary-color); border: none; cursor: pointer; }
.btn-primary:hover { background: #fff; box-shadow: 0 0 15px rgba(255,255,255,0.5); }
.btn-outline { border: 1px solid rgba(255,255,255,0.5); color: var(--white); }
.btn-outline:hover { background: var(--white); color: var(--primary-color); border-color: var(--white); }

/* --- SECCIONES --- */
.section { padding: 6rem 0; scroll-margin-top: 80px; }
.bg-light { background: #fff; }

.section-header { text-align: center; margin-bottom: 4rem; position: relative; }
.section-header h2 { color: var(--primary-color); margin-bottom: 0.5rem; font-size: 2.5rem; }
.section-header p { color: var(--text-light); }
.section-header::after { content: ''; display: block; width: 50px; height: 3px; background: var(--accent-color); margin: 1rem auto 0; }

/* --- PERFIL --- */
#perfil { background: var(--bg-light); }
.profile-grid { 
    display: flex; flex-direction: column; align-items: center; text-align: center;
    background: white; padding: 4rem; border-radius: 20px; box-shadow: var(--shadow);
    max-width: 1000px; margin: 0 auto;
}

.subtitle { color: var(--action-color); font-weight: 800; letter-spacing: 2px; text-transform: uppercase; font-size: 0.8rem; display: block; margin-bottom: 10px; }

/* NOMBRE EN EL PERFIL (NUEVO AZUL) */
.profile-text h2 { 
    color: var(--ortho-blue); 
    margin-bottom: 1.5rem; 
    font-size: 2.2rem; 
}

.credentials { display: inline-block; text-align: left; margin-top: 2rem; }
.credentials li { margin-bottom: 0.8rem; color: var(--text-dark); background: rgba(0,0,0,0.02); padding: 10px 20px; border-radius: 5px; border-left: 3px solid var(--accent-color); }
.credentials i { color: var(--accent-color); margin-right: 10px; }

/* --- CASOS --- */
#casos { background: var(--primary-color); color: white; position: relative; }
#casos .section-header h2 { color: white; }
#casos .section-header p { color: rgba(255,255,255,0.7); }

.floating-gallery-btn {
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(5px); color: var(--accent-color); 
    padding: 3rem; border-radius: 20px; cursor: pointer; 
    text-transform: uppercase; font-size: 1.5rem; width: 100%; max-width: 500px; margin: 0 auto;
    display: flex; flex-direction: column; align-items: center; gap: 15px; transition: var(--transition);
}
.floating-gallery-btn span { color: white; font-size: 0.9rem; font-weight: 400; background: var(--action-color); padding: 5px 15px; border-radius: 20px; text-transform: none; }
.floating-gallery-btn i { font-size: 3rem; margin-bottom: 5px; color: white; }
.floating-gallery-btn:hover { background: white; transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0,0,0,0.5); }
.floating-gallery-btn:hover i { color: var(--primary-color); }
.floating-gallery-btn:hover span { background: var(--primary-color); }

/* --- MODAL Y SLIDER --- */
.modal {
    display: none; position: fixed; z-index: 3000; left: 0; top: 0;
    width: 100%; height: 100%; background-color: rgba(0,0,0,0.95);
    backdrop-filter: blur(5px);
}
.modal-content {
    background-color: #000; margin: 2vh auto; width: 95%; max-width: 1400px;
    height: 96vh; border: 1px solid #333; display: flex; flex-direction: column;
    overflow: hidden; position: relative;
}
.close-modal {
    position: absolute; right: 15px; top: 10px; font-size: 35px; 
    color: #fff; cursor: pointer; z-index: 100; opacity: 0.7; transition: 0.3s;
}
.close-modal:hover { opacity: 1; color: var(--accent-color); }

.modal-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; height: 100%; width: 100%; overflow: hidden; }

.case-viewer { display: flex; flex-direction: column; background: #0f0f0f; position: relative; height: 100%; overflow: hidden; padding: 20px; }
.slider-container { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; position: relative; width: 100%; }
.main-image-wrapper { width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; position: relative; }
#mainImage { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; }
.img-counter { position: absolute; bottom: 20px; right: 20px; background: var(--accent-color); color: #000; font-weight: bold; padding: 5px 10px; border-radius: 4px; font-size: 0.9rem; }
.nav-btn { background: transparent; border: none; color: rgba(255,255,255,0.3); font-size: 3rem; padding: 20px; cursor: pointer; transition: 0.3s; height: 100%; position: absolute; z-index: 10; top: 0; display: flex; align-items: center; }
.nav-btn:hover { color: var(--accent-color); background: rgba(0,0,0,0.2); }
#prevBtn { left: 0; }
#nextBtn { right: 0; }
.viewer-info { background: #1a1a1a; padding: 15px; border-left: 4px solid var(--accent-color); color: #ddd; flex-shrink: 0; width: 100%; margin-top: 10px; }
.viewer-info h3 { color: var(--white); margin-bottom: 5px; font-size: 1.2rem; }
.viewer-info p { font-size: 0.9rem; margin-bottom: 2px; }
.current-case-thumbs { display: none; }

.case-thumbnails { background: #111; padding: 15px; overflow-y: auto; border-left: 1px solid #333; height: 100%; width: 300px; }
.case-thumbnails h4 { color: var(--white); margin-bottom: 1rem; text-transform: uppercase; font-size: 0.8rem; letter-spacing: 1px; border-bottom: 1px solid #333; padding-bottom: 10px; }
.thumbnails-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.thumb-item { cursor: pointer; overflow: hidden; border-radius: 4px; }
.thumb-item img { width: 100%; height: 80px; object-fit: cover; display: block; filter: grayscale(100%); transition: 0.3s; opacity: 0.6; }
.thumb-item:hover img, .thumb-item.active img { filter: grayscale(0%); opacity: 1; transform: scale(1.05); }

/* --- CONTACTO --- */
.contact-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; }
.info-item { background: white; padding: 1.5rem; margin-bottom: 1rem; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); display: flex; align-items: center; }
.info-item i { font-size: 1.5rem; color: var(--action-color); margin-right: 1.5rem; }
.info-item h4 { font-size: 0.9rem; margin-bottom: 0.2rem; color: var(--text-dark); }
.info-item p { margin: 0; color: var(--text-light); }

.contact-policy-box { display: flex; flex-direction: column; justify-content: center; gap: 2rem; }
.policy-alert {
    background-color: #fff; border-left: 5px solid var(--accent-color);
    padding: 2rem; box-shadow: 0 5px 15px rgba(0,0,0,0.05); border-radius: 0 8px 8px 0;
}
.policy-alert i { font-size: 2rem; color: var(--accent-color); margin-bottom: 1rem; }
.policy-alert h3 { color: var(--primary-color); margin-bottom: 1rem; font-size: 1.2rem; text-transform: uppercase; }
.policy-alert p { color: var(--text-dark); font-size: 1rem; line-height: 1.8; }
.policy-alert strong { color: var(--action-color); font-weight: 700; }

.action-area { text-align: center; }
.btn-whatsapp-full {
    display: block; width: 100%;
    background: #25d366; 
    color: white; text-align: center; padding: 1.2rem;
    font-size: 1.2rem; font-weight: 800; border-radius: 8px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    transition: var(--transition); letter-spacing: 1px;
}
.btn-whatsapp-full:hover { background: #25d366; transform: translateY(-3px); color: white; }
.btn-whatsapp-full i { margin-right: 10px; font-size: 1.4rem; }

/* --- FOOTER --- */
footer { background: #000; color: #888; padding: 3rem 0; text-align: center; border-top: 3px solid var(--accent-color); }
.socials a { color: white; margin: 0 10px; font-size: 1.5rem; }

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .container { width: 88%; } 
    .section-header h2 { font-size: 1.8rem; overflow-wrap: break-word; line-height: 1.2; }

    .logo { font-size: 0.8rem; max-width: 60%; }
    .nav-logo-img { height: 35px; }

    .nav-links { 
        position: absolute; right: 0; top: 70px;
        background: var(--primary-color); flex-direction: column; width: 100%; height: auto; 
        padding: 2rem 0; transform: translateX(100%); transition: var(--transition);
        align-items: center; gap: 1.5rem;
        box-shadow: 0 10px 20px rgba(0,0,0,0.5); border-bottom: 3px solid var(--accent-color);
    }
    .nav-links.active { transform: translateX(0); }
    .nav-links li a { color: #ffffff; font-size: 1.3rem; }
    .nav-links .btn-nav { width: 70%; text-align: center; background: var(--accent-color); color: var(--primary-color) !important; margin-top: 1rem; }
    .menu-toggle { display: block; color: var(--primary-color); font-size: 1.5rem; }

    .hero { padding-top: 100px; text-align: center; height: auto; min-height: 100vh; }
    .hero-content { border-left: none; border-top: 5px solid var(--accent-color); padding-top: 2rem; }
    .hero h1 { font-size: 1.8rem; line-height: 1.3; margin-bottom: 1rem;} 
    .hero-btns { display: flex; flex-direction: column; gap: 1rem; align-items: center; }
    .btn { margin-right: 0; width: 100%; text-align: center; }

    .profile-grid, .contact-wrapper { grid-template-columns: 1fr; gap: 2rem; }
    
    .modal-content { height: 100%; width: 100%; margin: 0; }
    .modal-body { grid-template-columns: 1fr; grid-template-rows: 1fr 120px; }
    .case-thumbnails { width: 100%; height: 100%; border-left: none; border-top: 1px solid #333; }
    .thumbnails-grid { grid-template-columns: repeat(4, 1fr); }
    
    .policy-alert { border-left: none; border-top: 5px solid var(--accent-color); text-align: center; }
}