﻿/* ==== FUENTES MODERNAS Y BASE ==== */
@import url('https://fonts.googleapis.com/css?family=Playfair+Display:700,900|Montserrat:400,700&display=swap');

body {
    font-family: 'Montserrat', Arial, Helvetica, sans-serif;
    background: #f6f7fb;
    color: #232323;
    padding-top: 70px;
    padding-bottom: 30px;
    font-size: 18px;
    line-height: 1.65;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    color: #1a2233;
    letter-spacing: -1px;
}

h1 {
    font-size: 2.8rem;
    line-height: 1.12;
}

h2 {
    font-size: 2.1rem;
}

h3 {
    font-size: 1.6rem;
}

/* === LAYOUT Y ESPACIADO === */
.body-content, .container {
    padding-left: 30px !important;
    padding-right: 30px !important;
    max-width: 1120px;
}

.section-title {
    font-size: 2.2rem;
    margin-bottom: 1.3rem;
    font-family: 'Playfair Display', serif;
    border-left: 6px solid #3477eb;
    padding-left: 14px;
    color: #21243d;
    background: transparent;
}

/* === NAVBAR === */
.navbar {
    background: #fff;
    box-shadow: 0 2px 12px rgba(33,40,70,0.06);
    border-bottom: 1px solid #ebebeb;
    padding: 0.7rem 1.5rem;
}

.navbar-brand {
    font-family: 'Playfair Display', serif;
    font-size: 2.1rem !important;
    font-weight: 900;
    color: #1a2233 !important;
    letter-spacing: -2px;
    margin-right: 2.5rem;
    display: flex;
    align-items: center;
}

    .navbar-brand img[alt="Logo IEmagazine"] {
        display: inline-block;
        vertical-align: middle;
        height: 38px;
        margin-right: 10px;
    }

        .navbar-brand img[alt="Logo IEmagazine"][src=""],
        .navbar-brand img[alt="Logo IEmagazine"]:not([src]) {
            display: none !important;
        }

.navbar-nav .nav-link {
    font-size: 1.15rem;
    font-weight: 700;
    color: #395179 !important;
    margin-right: 1.2rem;
    transition: color 0.2s;
}

    .navbar-nav .nav-link:hover,
    .navbar-nav .nav-link.active {
        color: #3477eb !important;
    }

/* === BOTONES === */
.btn, .btn-primary {
    border-radius: 30px;
    padding: 0.5rem 1.6rem;
    font-weight: 700;
    background: #3477eb;
    border: none;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(52,119,235,0.08);
    transition: background 0.2s, box-shadow 0.2s;
}

    .btn:hover, .btn-primary:hover {
        background: #263859;
        box-shadow: 0 4px 16px rgba(52,119,235,0.13);
    }

/* === CARDS Y SOMBRAS === */
.card, .article-card {
    border: none;
    border-radius: 18px;
    box-shadow: 0 4px 22px 0 rgba(40,60,160,0.10);
    margin-bottom: 2rem;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.18s, transform 0.18s;
    min-width: 0;
}

    .card:hover, .article-card:hover {
        box-shadow: 0 8px 34px 0 rgba(40,60,160,0.13);
        transform: translateY(-5px) scale(1.015);
    }

.card-title, .article-card-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: #1a2233;
    margin-top: 1rem;
    margin-bottom: 0.7rem;
    font-weight: 700;
}

.card-text, .article-card-text {
    font-size: 1.09rem;
    color: #384262;
    line-height: 1.7;
    margin-bottom: 1rem;
}

/* === IMÁGENES DE ARTÍCULOS === */
.article-img, .card-img-top, .card-img {
    width: 100%;
    height: 205px;
    object-fit: cover;
    border-radius: 14px 14px 0 0;
    background: #e9eaf3;
    transition: filter 0.2s;
    display: block;
}

.article-card:hover .article-img,
.card:hover .card-img-top {
    filter: brightness(0.96) saturate(1.08) blur(0.5px);
}

/* === HERO SECTION === */
.hero-section {
    position: relative;
    min-height: 240px; /* Cambiado para mejor responsive */
    background: linear-gradient(100deg, #395179 0%, #3477eb 100%);
    border-radius: 22px;
    overflow: hidden;
    margin-bottom: 2.5rem;
    color: #fff;
    box-shadow: 0 8px 32px 0 rgba(52,119,235,0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.8rem 1.5rem 2.8rem 1.5rem;
    flex-direction: column;
    text-align: center;
}

    .hero-section .hero-title {
        font-family: 'Playfair Display', serif;
        font-size: 2.6rem;
        color: #fff;
        margin-bottom: 0.6rem;
        margin-top: 0;
    }

    .hero-section .hero-desc {
        font-size: 1.22rem;
        color: #f6f7fb;
        margin-bottom: 1.3rem;
    }

    .hero-section .btn {
        background: #fff;
        color: #3477eb !important;
    }

    /* Siempre mostrar el título aunque no haya imagen */
    .hero-section img[alt="Logo IEmagazine"][src=""],
    .hero-section img[alt="Logo IEmagazine"]:not([src]) {
        display: none !important;
    }

/* === CATEGORÍAS DESTACADAS (TAG) === */
.article-category {
    display: inline-block;
    font-size: 0.95rem;
    font-weight: 700;
    color: #3477eb;
    background: #e7eefb;
    border-radius: 16px;
    padding: 0.22em 1.1em;
    margin-bottom: 0.7em;
    text-transform: uppercase;
    letter-spacing: 1px;
    max-width: 85%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* === AUTOR Y FECHA === */
.article-meta {
    font-size: 0.99rem;
    color: #848ca6;
    margin-bottom: 0.3em;
}

/* === SECCIÓN NEWSLETTER === */
.newsletter-block {
    background: #fffbe6;
    border-radius: 18px;
    padding: 2.2rem 2.5rem 1.6rem 2.5rem;
    box-shadow: 0 4px 16px 0 rgba(255,217,92,0.07);
    margin-bottom: 2.2rem;
    text-align: center;
}

.newsletter-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    color: #1a2233;
    margin-bottom: 1.2rem;
}

.newsletter-input {
    border-radius: 24px;
    padding: 0.7rem 1.5rem;
    border: 1.5px solid #e1e1e1;
    margin-right: 0.5rem;
    max-width: 320px;
}

.newsletter-btn {
    background: #3477eb;
    color: #fff !important;
    border-radius: 24px;
    border: none;
    padding: 0.7rem 2.3rem;
    font-weight: 700;
    transition: background 0.2s;
}

    .newsletter-btn:hover {
        background: #263859;
    }

/* === PUBLICIDAD - AJUSTE TOTAL === */
.banner-main, .publicidad-main, .banner-main-img, .banner-main img, .publicidad-main img {
    width: 100% !important;
    min-height: 70px;
    max-height: 190px;
    object-fit: cover;
    display: block;
    margin-left: auto;
    margin-right: auto;
    background: #e6eaff;
    border-radius: 18px;
    box-shadow: 0 4px 22px 0 rgba(40,60,160,0.09);
    margin-bottom: 2rem;
}

/* Para banners dobles (inferiores) */
@media (min-width: 768px) {
    .publicidad-main {
        height: 170px;
        min-height: 70px;
        max-height: 190px;
    }
}

@media (max-width: 767px) {
    .banner-main, .publicidad-main, .banner-main-img {
        height: 70px;
        min-height: 70px;
        max-height: 90px;
        border-radius: 10px;
    }
}

.row > .col-md-4.d-flex {
    padding-bottom: 1rem;
}

/* === FOOTER === */
.footer {
    background: #23243a;
    color: #fff;
    padding: 3rem 0 2rem 0;
    margin-top: 4rem;
    font-size: 1.06rem;
}

    .footer a, .footer a:visited {
        color: #ffe787;
        text-decoration: none;
        transition: color 0.15s;
    }

        .footer a:hover {
            color: #ffbf2a;
        }

.footer-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: #ffe787;
    margin-bottom: 1rem;
    font-weight: 900;
}

/* === SOCIAL ICONS === */
.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 1.3rem;
}

    .social-icons a {
        display: inline-block;
        background: #3949ab;
        color: #fff;
        width: 40px;
        height: 40px;
        line-height: 40px;
        border-radius: 50%;
        text-align: center;
        font-size: 1.28rem;
        transition: background 0.18s;
    }

        .social-icons a:hover {
            background: #3477eb;
        }

/* === PAGINACIÓN Y SCROLL === */
.pagination > li > a, .pagination > li > span {
    border-radius: 40px !important;
    margin: 0 0.2em;
    color: #3477eb;
    border: 1.4px solid #e1e1e1;
    background: #fff;
}

.pagination > li.active > a,
.pagination > li.active > span {
    background: #3477eb !important;
    color: #fff !important;
    border-color: #3477eb;
}

/* === FORMULARIOS Y CAMPOS === */
input, select, textarea {
    max-width: 100%;
    border-radius: 14px;
    border: 1.2px solid #e4e4e4;
    padding: 0.55em 1.15em;
    background: #f8fafd;
    font-size: 1.06rem;
    margin-bottom: 1.1em;
    transition: border 0.2s, box-shadow 0.2s;
}

    input:focus, select:focus, textarea:focus {
        border-color: #3477eb;
        box-shadow: 0 1px 8px rgba(52,119,235,0.07);
        outline: none;
    }

/* === MICROANIMACIONES Y HOVERS === */
a, .btn, .card, .article-card, .navbar-nav .nav-link {
    transition: all 0.18s cubic-bezier(.25,.8,.25,1);
}

    a:hover {
        color: #3477eb;
        text-decoration: underline;
    }

::-webkit-scrollbar {
    width: 8px;
    background: #edeff6;
}

::-webkit-scrollbar-thumb {
    background: #c0c7d6;
    border-radius: 8px;
}

/* === RESPONSIVE (MOBILE FIRST) === */
@media (max-width: 991px) {
    .body-content, .container {
        padding-left: 9px !important;
        padding-right: 9px !important;
    }

    .hero-section {
        padding: 2.2rem 0.5rem;
        min-height: 140px;
    }

    .card, .article-card {
        margin-bottom: 1.1rem;
    }

    .footer {
        padding: 1.8rem 0 1.2rem 0;
    }

    .section-title, .hero-title, .newsletter-title {
        padding-left: 7px;
        font-size: 1.13rem;
    }
}

@media (max-width: 767px) {
    h1 {
        font-size: 1.85rem;
    }

    h2 {
        font-size: 1.24rem;
    }

    .section-title {
        font-size: 1.17rem;
    }

    .navbar-brand {
        font-size: 1.2rem !important;
    }

    .card-img-top, .article-img {
        height: 130px;
    }

    .hero-section {
        font-size: 1rem;
    }
}

hr, .card hr, .article-card hr {
    border: none;
    margin: 0;
    height: 1px;
    background: #f4f5f9;
}

/* === Responsive navbar-brand para móviles === */
@media (max-width: 500px) {
    .navbar-brand {
        font-size: 1.3rem !important;
    }

        .navbar-brand img {
            height: 24px !important;
            margin-right: 7px !important;
        }
}

/* === FIN DE ESTILOS PREMIUM === */

