:root {
    --primary-blue: #007bff;
    --primary-blue-hover: #0056b3;
    --whatsapp-green: #25D366;
    --whatsapp-green-hover: #1EBE57;
    --primary-dark: #0A2540;
    --primary-dark-hover: #071a2e;
}

/* General Body & Typography */
body {
    font-family: 'Lato', sans-serif;
    margin: 0;
    background-color: #e0f2f7;
    color: #212529;
    line-height: 1.6;
    font-size: 16px; /* Base font size */
}

img {
    max-width: 100%;
    height: auto;
}

.hidden {
    display: none;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header & Footer */
.site-header, .site-footer {
    background-color: #ffffff;
    padding: 1rem 0;
    border-bottom: 1px solid #a7d9ed;
}

.site-footer {
    border-top: 1px solid #a7d9ed;
    border-bottom: none;
    text-align: center;
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: 3rem;
}

.site-header h1 {
    margin: 0;
    font-size: 1.75rem;
    color: var(--primary-blue-hover);
    text-align: center;
    width: 100%; /* Ocupa todo el ancho para un centrado perfecto */
}

/* Logo */
.logo {
    max-height: 50px;
    width: auto;
    position: absolute; /* Lo saca del flujo para no afectar el centrado del título */
    left: 1.5rem; /* Alineado con el padding del container */
    top: 50%;
    transform: translateY(-50%);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: center; /* Centra el h1 */
    height: 50px;
    position: relative;
}

/* Main Content */
main.container {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

#search {
    width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    border: 1px solid #a7d9ed;
    box-sizing: border-box;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#search:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 0.25rem rgba(52, 152, 219, 0.25);
}

/* ... (rest of the styles are mostly fine) ... */

/* Certificate Cards */
#certificados-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.certificado-card {
    background-color: #ffffff;
    border: 1px solid #a7d9ed;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.certificado-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.certificado-card h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: #0A2540;
    font-size: 1.25rem;
}

.certificado-card p {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    color: #6c757d;
}

.certificado-card ul {
    padding-left: 20px;
    margin-bottom: 1.5rem;
}

.pdf-link {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background-color: var(--primary-dark);
    color: white;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    transition: background-color 0.2s ease;
}

/* Contact Buttons */
#contact-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

#contact-buttons .contact-btn {
    display: block;
    padding: 0.75rem 1.5rem;
    color: white;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    text-align: center;
    min-width: 200px;
    border: 1px solid; /* Make border visible */
}

#contact-buttons .email-btn {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
}

#contact-buttons .email-btn:hover {
    background-color: var(--primary-blue-hover);
    border-color: var(--primary-blue-hover);
}

#contact-buttons .whatsapp-btn {
    background-color: var(--whatsapp-green);
    border-color: var(--whatsapp-green);
}

#contact-buttons .whatsapp-btn:hover {
    background-color: var(--whatsapp-green-hover);
    border-color: var(--whatsapp-green-hover);
}

/* Landing Page Content */
#landing-content {
    text-align: center;
    margin-top: 3rem;
}

.hero h2 {
    font-size: 2.5rem;
    color: var(--primary-dark);
    margin-bottom: 1rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
    text-align: left;
}

.service-card {
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid #a7d9ed;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.service-card h3 {
    margin-top: 0;
    color: var(--primary-blue);
    text-align: center;
}

/* === Responsive Design === */

/* Tablet Breakpoint */
@media (max-width: 768px) {
    .site-header h1 {
        font-size: 1.5rem; /* Reduce font size for tablets */
    }

    .hero h2 {
        font-size: 2rem;
    }
}

/* Mobile Breakpoint */
@media (max-width: 600px) {
    .container {
        padding: 0 1rem;
    }

    .logo {
        position: static; /* Vuelve al flujo normal */
        transform: none;
        left: auto;
    }

    .site-header .container {
        justify-content: flex-start; /* Alinea los items a la izquierda */
        gap: 1rem;
    }

    .site-header h1 {
        font-size: 1.2rem; /* Further reduce font size for mobile */
        width: auto; /* Ancho automático */
        text-align: left;
    }

    #search {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }

    .certificado-card {
        padding: 1rem;
    }

    #contact-buttons .contact-btn {
        width: 100%; /* Make buttons full-width */
        min-width: auto;
        padding: 0.75rem;
        font-size: 1rem;
    }

    .hero h2 {
        font-size: 1.8rem;
    }
}
