/* ========================================================
   ARCHIVO: css/styles.css
   PROPÓSITO: Diseño visual, responsividad y tipografías
   ======================================================== */

/* Reset de estilos básicos */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #2d3748;
    background-color: #f7fafc;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Encabezado Principal */
.main-header {
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 22px;
    text-decoration: none;
    color: #1a365d;
}

.logo span {
    color: #3182ce;
    font-weight: 300;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
    align-items: center;
}

.main-nav a {
    text-decoration: none;
    color: #4a5568;
    font-weight: 500;
    transition: color 0.2s ease;
}

.main-nav a:hover {
    color: #3182ce;
}

.main-nav .btn-portal {
    background-color: #1a365d;
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.main-nav .btn-portal:hover {
    background-color: #2b6cb0;
    color: #ffffff;
}

/* Sección Hero (Bienvenida) */
.hero-section {
    background: linear-gradient(135deg, #1a365d 0%, #2a4365 100%);
    color: #ffffff;
    padding: 80px 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 36px;
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.hero-content p {
    font-size: 18px;
    margin-bottom: 30px;
    color: #e2e8f0;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Botones Generales */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: #3182ce;
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #2b6cb0;
    transform: translateY(-1px);
}

/* Sección Catálogo */
.catalog-section {
    padding: 60px 0;
    text-align: center;
}

.catalog-section h2 {
    font-size: 28px;
    color: #1a365d;
    margin-bottom: 5px;
}

.subtitle {
    color: #718096;
    margin-bottom: 40px;
}

/* Filtros Superiores */
.categories-filter {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.btn-filter {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 10px 20px;
    border-radius: 20px;
    color: #4a5568;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-filter:hover {
    border-color: #cbd5e0;
    background-color: #f7fafc;
}

.btn-filter.active {
    background-color: #3182ce;
    color: #ffffff;
    border-color: #3182ce;
}

/* Cuadrícula de Trámites */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.product-card {
    background-color: #ffffff;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 24px;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px rgba(0,0,0,0.05);
}

.product-card h3 {
    font-size: 18px;
    color: #2d3748;
    margin-bottom: 12px;
}

.product-desc {
    color: #718096;
    font-size: 14px;
    margin-bottom: 20px;
    flex-grow: 1;
}

.product-price {
    font-size: 20px;
    font-weight: 700;
    color: #2b6cb0;
    margin-bottom: 15px;
}

.btn-buy {
    width: 100%;
    background-color: #edf2f7;
    color: #2b6cb0;
    border: none;
    padding: 10px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
}

.btn-buy:hover {
    background-color: #3182ce;
    color: #ffffff;
}

/* Paginación */
.pagination-container {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.page-btn {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.page-btn.active, .page-btn:hover {
    background-color: #1a365d;
    color: #ffffff;
    border-color: #1a365d;
}

/* Formulario de Contacto */
.contact-section {
    background-color: #ffffff;
    padding: 60px 0;
    text-align: center;
    border-top: 1px solid #e2e8f0;
}

.contact-section h2 {
    color: #1a365d;
    margin-bottom: 10px;
}

.clean-form {
    max-width: 500px;
    margin: 30px auto 0 auto;
    text-align: left;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #4a5568;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 15px;
    color: #2d3748;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(66,153,225,0.15);
}

.btn-submit {
    width: 100%;
    background-color: #3182ce;
    color: #ffffff;
}

/* Pie de página */
.main-footer {
    background-color: #1a365d;
    color: #a0aec0;
    padding: 25px 0;
    text-align: center;
    font-size: 14px;
}

/* Ajustes Responsivos para Teléfonos Móviles */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 15px;
    }
    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }
    .hero-content h1 {
        font-size: 26px;
    }
    .hero-content p {
        font-size: 15px;
    }
}