/* Variables de colores formales */
:root {
    --primary: #1a3a6c;      /* Azul principal */
    --secondary: #2c5f9e;    /* Azul secundario */
    --accent: #4a6fa5;       /* Azul acento */
    --light: #f8f9fa;        /* Gris muy claro */
    --dark: #212529;         /* Gris oscuro */
    --gray: #6c757d;         /* Gris medio */
    --light-gray: #e9ecef;   /* Gris claro */
    --medium-gray: #adb5bd;  /* Gris intermedio */
}

/* Reset y base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background-color: #f5f7fa;
}

h1, h2, h3, h4, h5 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    background-color: var(--accent);
    color: white;
    border: none;
    border-radius: 4px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    font-size: 0.95rem;
}

.btn:hover {
    background-color: #3a5a80;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn-secondary {
    background-color: var(--secondary);
}

.btn-secondary:hover {
    background-color: #1f4a82;
}

.text-center {
    text-align: center;
}

/* Header */
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 50px;
    margin-right: 15px;
}

.logo h1 {
    font-size: 1.8rem;
    margin: 0;
    color: var(--primary);
}

.logo span {
    color: var(--accent);
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 25px;
}

nav ul li a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.3s;
    position: relative;
}

nav ul li a:hover {
    color: var(--accent);
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    transition: width 0.3s;
}

nav ul li a:hover::after {
    width: 100%;
}

.mobile-menu {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section con imagen de fondo */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    color: white;
    text-align: center;
    padding-top: 80px;
    position: relative;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero h2 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: white;
    line-height: 1.2;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

/* Hero Section con video de fondo - Overlay gris con menos opacidad */
.hero-video {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    overflow: hidden;
    padding-top: 80px;
}

.hero-video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(40, 40, 40, 0.5); /* Gris oscuro con 40% de opacidad */
    z-index: -1;
}

/* Si prefieres un gris más claro */
.hero-overlay-light {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(100, 100, 100, 0.3); /* Gris medio con 30% de opacidad */
    z-index: -1;
}

/* Si prefieres blanco con muy poca opacidad */
.hero-overlay-white {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2); /* Blanco con 20% de opacidad */
    z-index: -1;
}

/* Secciones generales */
.section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--accent);
}

/* About Section */
.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-text {
    flex: 1;
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.about-image {
    flex: 1;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s;
}

.about-image img:hover {
    transform: scale(1.03);
}

/* Services Section */
.services {
    background-color: var(--light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
    padding: 30px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.service-icon {
    font-size: 3rem;
    color: var(--secondary);
    margin-bottom: 20px;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.service-card p {
    flex-grow: 1;
}

/* Library Section */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 50px;
    max-width: 1000px;
    margin: 0 auto;
}

.book-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.book-card:hover {
    transform: translateY(-8px);
}

.book-image {
    width: 100%;
    height: 425px;
    overflow: hidden;
    position: relative;
    background-color: #f8f9fa;
}

.book-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
    position: absolute;
    top: 0;
    left: 0;
}

.book-card:hover .book-image img {
    transform: scale(1.03);
}

.book-info {
    padding: 18px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.book-info h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    line-height: 1.3;
}

.book-info .author {
    color: var(--gray);
    font-style: italic;
    font-size: 0.9rem;
    margin-bottom: 12px;
    display: block;
}

.book-info .price {
    font-weight: 700;
    color: var(--accent);
    font-size: 1.1rem;
    margin-bottom: 12px;
    margin-top: auto;
}

.book-info p {
    font-size: 0.95rem;
    margin-bottom: 15px;
    flex-grow: 1;
}

.book-info .btn {
    margin-top: 10px;
    width: 100%;
    padding: 10px;
    font-size: 0.9rem;
}

/* Contact Section */
.contact-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 50px;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.contact-details {
    margin-bottom: 30px;
}

.contact-item {
    display: flex;
    margin-bottom: 20px;
}

.contact-icon {
    font-size: 1.5rem;
    color: var(--secondary);
    margin-right: 15px;
    min-width: 30px;
}

.contact-text h4 {
    margin-bottom: 5px;
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--light-gray);
    border-radius: 4px;
    font-family: 'Open Sans', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.contact-form textarea {
    height: 150px;
    resize: vertical;
}

/* Footer */
footer {
    background-color: var(--primary);
    color: white;
    padding: 70px 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.footer-column h3 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--accent);
}

.footer-column p {
    margin-bottom: 20px;
    opacity: 0.9;
    line-height: 1.6;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #ddd;
    text-decoration: none;
    transition: color 0.3s;
    display: block;
    padding: 5px 0;
}

.footer-links a:hover {
    color: var(--accent);
    transform: translateX(5px);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: white;
    transition: all 0.3s;
    text-decoration: none;
}

.social-links a:hover {
    background-color: var(--accent);
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
    opacity: 0.8;
}