/* =========================================
   MAGISTRADO ELITE - ESTILO PREMIUM
   ========================================= */

:root {
    --primary: #0a192f;
    /* Azul Medianoche */
    --accent: #c5a059;
    /* Bronce/Dorado */
    --light: #f4f4f4;
    --white: #ffffff;
    --text: #333;
}

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

body {
    font-family: 'Lato', sans-serif;
    background-color: var(--white);
    color: var(--text);
    line-height: 1.7;
}

h1,
h2,
h3,
h4 {
    font-family: 'Cinzel', serif;
    color: var(--primary);
}

a {
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- TOP BAR --- */
.top-bar {
    background-color: #050d1a;
    color: #8892b0;
    padding: 10px 0;
    font-size: 0.8rem;
    border-bottom: 1px solid #1e2d3d;
}

.tb-flex {
    display: flex;
    justify-content: space-between;
}

.tb-contact span {
    margin-right: 20px;
}

.tb-contact i {
    color: var(--accent);
    margin-right: 5px;
}

/* --- NAVBAR --- */
.navbar {
    background: var(--white);
    padding: 25px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--primary);
}

.logo i {
    font-size: 2.5rem;
    color: var(--accent);
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.logo-text span {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 2px;
}

.logo-text small {
    font-size: 0.7rem;
    letter-spacing: 3px;
    color: #666;
}

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

.nav-links a {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: 0.3s;
}

.nav-links a:hover {
    color: var(--accent);
}

.btn-nav {
    border: 2px solid var(--primary);
    padding: 10px 25px;
    transition: 0.3s;
}

.btn-nav:hover {
    background: var(--primary);
    color: white !important;
}

/* --- HERO --- */
.hero {
    height: 85vh;
    background: url('https://images.unsplash.com/photo-1497366216548-37526070297c?auto=format&fit=crop&w=1600&q=80');
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 25, 47, 0.85);
}

.hero-content {
    position: relative;
    z-index: 2;
    color: white;
    max-width: 800px;
    text-align: center;
    margin: 0 auto;
}

.hero-subtitle {
    display: block;
    color: var(--accent);
    letter-spacing: 4px;
    font-size: 0.9rem;
    margin-bottom: 20px;
    font-weight: bold;
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 30px;
    color: white;
}

.hero p {
    font-size: 1.2rem;
    color: #a8b2d1;
    margin-bottom: 40px;
}

.btn-gold {
    background: var(--accent);
    color: var(--primary);
    padding: 15px 40px;
    font-weight: bold;
    font-size: 1rem;
    letter-spacing: 1px;
    transition: 0.3s;
    display: inline-block;
}

.btn-gold:hover {
    background: white;
}

/* --- ÁREAS --- */
.section-areas {
    padding: 100px 0;
    background-color: var(--light);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 3rem;
    margin-bottom: 15px;
}

.separator {
    width: 80px;
    height: 3px;
    background: var(--accent);
    margin: 0 auto;
}

.areas-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.area-item {
    background: white;
    padding: 40px;
    border-top: 5px solid transparent;
    transition: 0.3s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.area-item:hover {
    border-top-color: var(--accent);
    transform: translateY(-5px);
}

.area-item i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.area-item h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.area-item a {
    color: var(--accent);
    font-weight: bold;
    font-size: 0.9rem;
}

/* --- SOCIOS --- */
.section-partners {
    padding: 100px 0;
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 50px;
}

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

.p-img img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    filter: grayscale(100%);
    transition: 0.5s;
}

.partner-card:hover .p-img img {
    filter: grayscale(0%);
}

.p-info {
    padding: 20px 0;
}

.p-info h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.p-info span {
    color: var(--accent);
    font-weight: bold;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 10px;
}

.p-info p {
    font-size: 0.9rem;
    color: #666;
}

/* --- BLOG --- */
.section-blog {
    padding: 100px 0;
    background-color: var(--primary);
    color: white;
}

.blog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px;
}

.blog-header h2 {
    color: white;
    margin: 0;
}

.btn-link {
    color: var(--accent);
    border-bottom: 1px solid var(--accent);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.blog-post {
    background: #112240;
    transition: 0.3s;
}

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

.post-img {
    position: relative;
    height: 200px;
}

.post-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.date {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent);
    color: var(--primary);
    padding: 5px 10px;
    font-weight: bold;
    font-size: 0.8rem;
}

.post-content {
    padding: 25px;
}

.post-content h4 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 10px;
    font-family: 'Lato';
}

.post-content p {
    color: #8892b0;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.post-content a {
    color: var(--accent);
    font-size: 0.9rem;
}

/* --- CONTACTO --- */
.section-contact {
    padding: 100px 0;
}

.contact-box {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

.c-left {
    background: var(--primary);
    color: white;
    padding: 60px;
}

.c-left h2 {
    color: white;
    margin-bottom: 20px;
}

.c-list {
    list-style: none;
    margin-top: 40px;
}

.c-list li {
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    align-items: center;
    font-size: 1.1rem;
}

.c-list i {
    color: var(--accent);
}

.c-right {
    background: white;
    padding: 60px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.input-field {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    margin-bottom: 20px;
    font-family: 'Lato';
    background: #f9f9f9;
}

.full {
    width: 100%;
    border: none;
    cursor: pointer;
    transition: 0.3s;
}

.full:hover {
    background: var(--primary);
    color: white;
}

/* --- FOOTER --- */
.footer {
    background: #020c1b;
    color: #8892b0;
    text-align: center;
    padding: 30px 0;
    font-size: 0.8rem;
}

/* --- CHAT WIDGET --- */
.live-chat-widget {
    position: fixed;
    bottom: 0;
    right: 30px;
    width: 300px;
    background: white;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
    z-index: 200;
    border-radius: 10px 10px 0 0;
    overflow: hidden;
}

.chat-head {
    background: var(--primary);
    color: white;
    padding: 15px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-body {
    padding: 20px;
    height: 200px;
    background: #f4f4f4;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.msg-system {
    background: white;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #333;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.chat-body input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .areas-grid,
    .partners-grid,
    .blog-grid,
    .contact-box {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .live-chat-widget {
        display: none;
    }

    /* Ocultar chat en móvil para no estorbar */
}