<?php
$titulo_pagina = isset($titulo_pagina) ? $titulo_pagina : "Colegio Químico Farmacéutico Departamental de Lima";
?>
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><?php echo htmlspecialchars($titulo_pagina); ?></title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<link href="https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,400;14..32,500;14..32,600;14..32,700&family=Playfair+Display:wght@400;500;600&display=swap" rel="stylesheet">
<style>
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Inter', sans-serif;
    background: #f5f7fa;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ===== HEADER MEJORADO ===== */
.top-bar {
    background: white;
    padding: 8px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    border-bottom: 3px solid #f2aa21; /* Línea dorada institucional */
    position: relative;
    z-index: 100;
}
.container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    flex-wrap: wrap;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}
/* Logo y texto */
.logo {
    display: flex;
    align-items: center;
    gap: 18px;
    transition: transform 0.2s ease;
}
.logo:hover {
    transform: scale(1.01);
}
.logo img {
    height: 80px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}
.logo-texto strong {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #002244;
    letter-spacing: -0.3px;
    line-height: 1.3;
}
.logo-texto small {
    font-size: 0.8rem;
    color: #5a6874;
    font-weight: 500;
    letter-spacing: 0.5px;
    display: block;
    margin-top: 4px;
}
/* Navegación */
nav ul {
    display: flex;
    list-style: none;
    gap: 28px;
    flex-wrap: wrap;
}
nav ul li a {
    font-weight: 600;
    font-size: 0.95rem;
    color: #1e2a3a;
    text-decoration: none;
    padding: 8px 0;
    position: relative;
    transition: all 0.25s;
    letter-spacing: -0.2px;
}
/* Efecto de subrayado elegante */
nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: #f2aa21;
    transition: width 0.25s ease;
}
nav ul li a:hover {
    color: #f2aa21;
}
nav ul li a:hover::after {
    width: 100%;
}
/* Estilo para el enlace activo (opcional, puedes agregar clase 'active' en cada página) */
nav ul li a.active {
    color: #f2aa21;
}
nav ul li a.active::after {
    width: 100%;
}

/* ===== ESTILOS FULL WIDTH PARA INDEX ===== */
.banner-container {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: #002244;
    width: 100%;
}
.banner {
    flex: 2;
}
.banner img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}
.lado-derecho {
    flex: 1;
    display: flex;
    align-items: center;
}
.botones-adaptables-cqfdl {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}
.boton-adaptable {
    width: 160px;
    height: 130px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
    border-radius: 16px;
    background: white;
    border: none;
    color: #0f2c4d;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 8px 18px rgba(0,0,0,0.08);
    transition: all 0.25s ease;
}
.boton-adaptable:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 22px rgba(0,0,0,0.12);
}
.boton-adaptable i {
    font-size: 28px;
    margin-bottom: 10px;
    color: #002244;
}
.boton-destacado {
    background: linear-gradient(135deg, #f2aa21, #d48f1b);
    color: #002244;
}
.boton-destacado i {
    color: #002244;
}
.boton-colegiados {
    background: linear-gradient(135deg, #1f5fbf, #0e3a7a);
    color: white;
}
.boton-colegiados i {
    color: white;
}
.subtitulo {
    font-size: 8px;
    font-weight: bold;
    color: #fff;
    background: rgba(0,0,0,0.4);
    padding: 3px 8px;
    border-radius: 30px;
    margin-top: 6px;
}

/* ===== FOOTER ===== */
footer {
    background: #002244;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    font-size: 0.85rem;
    border-top: 3px solid #f2aa21;
}

/* ===== CONTENEDOR GENERAL ===== */
.contenedor-pagina {
    max-width: 1280px;
    margin: 30px auto;
    padding: 0 20px;
    width: 100%;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .banner-container {
        flex-direction: column;
    }
    .lado-derecho {
        justify-content: center;
    }
    .container {
        flex-direction: column;
        text-align: center;
        padding: 0 20px;
    }
    nav ul {
        justify-content: center;
        gap: 18px;
    }
    .logo {
        justify-content: center;
    }
}
@media (max-width: 600px) {
    .logo img {
        height: 60px;
    }
    .logo-texto strong {
        font-size: 1rem;
    }
    nav ul li a {
        font-size: 0.85rem;
    }
}
</style>
</head>
<body>

<header class="top-bar">
    <div class="container">
        <div class="logo">
            <img src="https://intranet.tescanet.com/recursos/web/logocqfdlima2025.png" alt="Logo CQFP Lima">
            <div class="logo-texto">

            </div>
        </div>
        <nav>
            <ul>
                <li><a href="./" class="<?php echo basename($_SERVER['PHP_SELF']) == 'index.php' ? 'active' : ''; ?>">Inicio</a></li>
                <li><a href="./" class="<?php echo basename($_SERVER['PHP_SELF']) == 'institucional.php' ? 'active' : ''; ?>">Institucional</a></li>
                <li><a href="./" class="<?php echo basename($_SERVER['PHP_SELF']) == 'tramite.php' ? 'active' : ''; ?>">Trámite</a></li>
                <li><a href="./" class="<?php echo basename($_SERVER['PHP_SELF']) == 'normatividad.php' ? 'active' : ''; ?>">Normatividad</a></li>
                <li><a href="./" class="<?php echo basename($_SERVER['PHP_SELF']) == 'gestion.php' ? 'active' : ''; ?>">Gestión</a></li>
                <li><a href="./" class="<?php echo basename($_SERVER['PHP_SELF']) == 'intranet.php' ? 'active' : ''; ?>">Intranet</a></li>
            </ul>
        </nav>
    </div>
</header>
