/* Hero Section Mejorada */
.hero {
    background: linear-gradient(135deg, rgba(41, 47, 92, 0.5) 0%, rgba(234, 206, 202, 0.4) 100%),
                url('../assets/images/InstitutoLinares.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    color: var(--texto-claro);
    padding: 2rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, transparent 0%, rgba(0,0,0,0.3) 100%);
}

.hero-content {
    position: relative;
    z-index: 6;
    max-width: 800px;
    margin: 0 auto;
    animation: fadeInUp 1s ease-out;
    margin-top: 2rem;
}

/* Logo del colegio ENCIMA del texto en el HERO */
.hero-logo {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-logo img {
    max-height: 200px;
    width: auto;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5));
}

.hero h2 {
    margin-top: 0.5rem;
    font-size: 3.2rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--dorado);
    text-shadow: 3px 3px 6px rgba(0,0,0,0.5);
}

/* Estilo para el h3 con logo al lado */
.hero h3 {
    font-size: 2.0rem;
    font-weight: 400;
    margin-bottom: 2rem;
    color: var(--naranja);
    opacity: 0.95;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.1rem;
}

/* Logo pequeño al lado del texto "Instituto Linares" */
.instituto-logo {
    display: inline-flex;
    align-items: center;
}

.instituto-logo img {
    height: 3rem; /* Mismo tamaño que la fuente del h3 */
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.hero-frase {
    font-size: 1.4rem;
    font-style: italic;
    margin-bottom: 3rem;
    opacity: 0.95;
    font-weight: 300;
    color: var(--dorado-claro);
}

/* Sections Mejoradas */
.section {
    padding: 6rem 0;
    position: relative;
}

.section.bg-light {
    background: linear-gradient(135deg, var(--gris-claro) 0%, var(--beige) 100%);
}

.section h2 {
    text-align: center;
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 3rem;
    color: var(--azul-oscuro);
    position: relative;
    padding-bottom: 1.5rem;
}

.section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 5px;
    background: linear-gradient(90deg, var(--dorado), var(--rojo-vino));
    border-radius: 3px;
}

/* Content Grid Mejorado */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.text-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.text-content p {
    text-align: justify;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    color: var(--texto-oscuro);
}

.section-image {
    width: 100%;
    height: 400px;
    object-fit: contain;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
    background: var(--blanco);
    padding: 20px;
}

.section-image:hover {
    transform: scale(1.02);
}

/* Cards Grid Mejorado */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.card {
    background: var(--blanco);
    padding: 3rem 2rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(212, 175, 55, 0.1);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--dorado), var(--rojo-vino));
}

.card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
}

.card i {
    font-size: 4rem;
    color: var(--dorado);
    margin-bottom: 1.5rem;
    animation: float 3s ease-in-out infinite;
}

.card h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--azul-oscuro);
}

.card p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--texto-oscuro);
}

