/*
 * style.css
 * Tema: Banco Profesional
 * Colores clave:
 * - Azul Oscuro Bancario: #003366
 * - Azul Medio: #0056b3
 * - Dorado (Accent): #ffd700
 * - Fondo suave: #eef2f7
 * - Texto principal: #333
 */

/* --- Base Styles --- */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background: #eef2f7; /* Fondo suave */
    color: #333;
    -webkit-font-smoothing: antialiased; /* Mejorar renderizado de fuente */
    -moz-osx-font-smoothing: grayscale; /* Mejorar renderizado de fuente */
}

a {
    color: #0056b3;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #003366;
    text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 0.5em;
    font-weight: 600;
    color: #003366;
}

p {
    margin-bottom: 1em;
}

/* --- Header & Navigation --- */
header {
    background: #003366; /* Azul oscuro bancario */
    color: #fff;
    padding: 1.2rem 0;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

header h1 {
    margin: 0;
    font-size: 2.5rem;
    letter-spacing: 1px;
    color: #fff; /* El título del header debe ser blanco */
}

nav ul {
    padding: 0;
    list-style: none;
    margin-top: 15px;
    display: flex; /* Flexbox para la navegación */
    justify-content: center; /* Centrar ítems */
    flex-wrap: wrap; /* Permitir que los ítems se envuelvan en líneas más pequeñas */
}

nav ul li {
    margin: 0 12px; /* Espacio entre los elementos de navegación */
    padding: 5px 0;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.05rem;
    transition: color 0.3s ease;
    white-space: nowrap; /* Evitar saltos de línea en los enlaces */
}

nav a:hover {
    color: #ffd700; /* Dorado para resaltar */
}

/* --- Main Content Area --- */
main {
    padding: 30px 20px;
    max-width: 1100px;
    margin: auto;
}

/* --- Hero Section (index.php) --- */
.hero {
    background: linear-gradient(to right, #0056b3, #003366); /* Gradiente azul */
    color: #fff;
    padding: 60px;
    text-align: center;
    margin-bottom: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero button {
    background: #ffd700; /* Dorado */
    color: #003366;
    border: none;
    padding: 15px 35px;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.hero button:hover {
    background: #e6c200;
    transform: translateY(-2px);
}

/* --- General Info Sections (index.php, servicios.php, etc.) --- */
.info-section, .page-header, .page-content, .contact-page-header, .services-list, .calculator-section, .contact-details, .contact-map, .contact-form-section {
    background: #fff;
    padding: 30px;
    margin-bottom: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.info-section h2, .page-header h2, .page-content h2, .contact-page-header h2, .services-list h2, .calculator-section h2, .contact-details h2, .contact-map h2, .contact-form-section h2 {
    color: #0056b3; /* Azul medio */
    font-size: 2rem;
    margin-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

.info-section p, .page-header p, .page-content p, .contact-page-header p {
    font-size: 1.1rem;
    line-height: 1.8;
}

/* --- Servicios Page (servicios.php) --- */
.services-list {
    display: grid; /* Usar Grid para los servicios */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Columnas responsivas */
    gap: 25px;
}

.services-list .service-item {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #eee;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.services-list .service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.services-list .service-item h3 {
    color: #003366;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.services-list .service-item p {
    font-size: 1rem;
    color: #555;
}

/* --- Contact Page (contacto.php) --- */
.contact-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    text-align: center;
}

.contact-item {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.contact-item h3 {
    color: #003366;
    margin-bottom: 10px;
}

.contact-item p {
    font-size: 1.1rem;
    color: #555;
    word-wrap: break-word; /* Para URLs o emails largos */
}

.contact-map iframe {
    width: 100%;
    border-radius: 8px;
    overflow: hidden; /* Asegura que el iframe respete el border-radius */
}

.contact-form .form-group {
    margin-bottom: 18px;
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea {
    width: calc(100% - 24px); /* Ajusta para padding */
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    box-sizing: border-box; /* Incluye padding y border en el ancho/alto */
}

.contact-form textarea {
    min-height: 120px;
    resize: vertical;
}

.contact-form button[type="submit"] {
    background: #007bff;
    color: #fff;
    border: none;
    padding: 12px 25px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    width: 100%; /* Botón de ancho completo */
}

.contact-form button[type="submit"]:hover {
    background: #0056b3;
}

/* --- Calculator Page (calculadora-prestamos.php) --- */
.calculator-section {
    text-align: center;
    max-width: 600px;
    margin: 30px auto;
}

.calculator-section .form-group {
    margin-bottom: 20px;
}

.calculator-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
    font-size: 1.1rem;
}

.calculator-section input[type="number"] {
    width: calc(100% - 24px); /* Ajusta para padding */
    max-width: 300px; /* Limitar el ancho del input */
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1.1rem;
    box-sizing: border-box;
    text-align: center;
}

.calculator-section button#calculateBtn {
    background: #007bff;
    color: #fff;
    border: none;
    padding: 12px 30px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    margin-top: 15px;
}

.calculator-section button#calculateBtn:hover {
    background: #0056b3;
}

.calculator-section .results {
    margin-top: 30px;
    background: #f0f8ff; /* Fondo más claro para los resultados */
    border: 1px solid #cceeff;
    padding: 25px;
    border-radius: 8px;
}

.calculator-section .results h3 {
    color: #003366;
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.calculator-section .results p {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #444;
}

.calculator-section .results p span {
    font-weight: bold;
    color: #0056b3;
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 25px;
    background: #003366; /* Azul oscuro bancario */
    color: #fff;
    margin-top: 40px;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    nav ul {
        flex-direction: column; /* Apilar enlaces en pantallas pequeñas */
        align-items: center;
    }
    nav ul li {
        margin: 8px 0; /* Más espacio vertical */
    }
    .hero {
        padding: 40px 20px;
    }
    .hero p {
        font-size: 1.2rem;
    }
    .info-section h2, .page-header h2, .page-content h2, .contact-page-header h2 {
        font-size: 1.7rem;
    }
    .services-list {
        grid-template-columns: 1fr; /* Una columna en móviles */
    }
    .contact-details {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }
    nav a {
        font-size: 0.95rem;
    }
    .hero {
        padding: 30px 15px;
    }
    .hero p {
        font-size: 1rem;
    }
    .hero button {
        padding: 12px 25px;
        font-size: 1rem;
    }
    main {
        padding: 20px 15px;
    }
    .info-section, .page-header, .page-content, .contact-page-header, .services-list, .calculator-section, .contact-details, .contact-map, .contact-form-section {
        padding: 20px;
    }
}