/* ===== ESTILOS GENERALES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== HEADER ===== */
header {
    background-color: #1e394b;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo img {
    height: 120px;
    width: auto;
}

.datos p {
    margin: 5px 0;
    font-size: 1.2rem;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 15px;
}

nav a {
    color: #f5e07d;
    text-decoration: none;
    font-size: 1.8rem;
    transition: transform 0.3s ease;
    display: block;
}

nav a:hover {
    transform: scale(1.2);
}

/* ===== HERO SECTION ===== */
.hero {
    background: linear-gradient(rgba(44, 62, 80, 0.8), rgba(52, 152, 219, 0.8)), url('images/hero-bg.jpg') center/cover;
    color: white;
    text-align: center;
    padding: 4rem 0;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== FEATURES SECTION ===== */
.features {
    padding: 4rem 0;
    background: white;
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 3rem;
    color: #2c3e50;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: #3498db;
    margin: 10px auto;
    border-radius: 2px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e9ecef;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.feature-card p {
    color: #666;
    line-height: 1.6;
}

/* ===== INFO SECTION ===== */
.info {
    padding: 4rem 0;
    background: #f8f9fa;
}

.info-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.info-text h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.info-text p {
    margin-bottom: 1rem;
    line-height: 1.7;
    color: #555;
}

.info-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* ===== DOWNLOAD SECTION ===== */
.download-section {
    padding: 4rem 0;
    background: white;
    text-align: center;
}

.download-container h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 2.2rem;
}

.download-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: #555;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.download-container .btn,
.download-container .btn2,
.download-container .btn3,
.download-container .btn4 {
    display: inline-block;
    margin: 10px 5px;
    padding: 12px 25px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.download-container .btn:hover,
.download-container .btn2:hover,
.download-container .btn3:hover,
.download-container .btn4:hover {
    background: linear-gradient(135deg, #2980b9, #2573a7);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

/* BOTONES CON CLASES DE COLOR */
.download-container .btn-verde {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
}

.download-container .btn-ambar {
    background: linear-gradient(135deg, #d6b04b, #c19d3e);
}

.download-container .btn-naranja {
    background: linear-gradient(135deg, #ff8000, #e67300);
}

.download-container .btn-azul {
    background: linear-gradient(135deg, #51d1f6, #2ebcf0);
}

.download-info {
    background: #e8f4fc;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem auto;
    max-width: 600px;
    border-left: 4px solid #3498db;
}

.download-info p {
    margin: 10px 0;
    color: #2c3e50;
}

.instructions {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem auto;
    max-width: 600px;
    text-align: left;
}

.instructions h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    text-align: center;
}

.instructions ol {
    margin-left: 1.5rem;
}

.instructions li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.ordenanza {
    margin-top: 2rem;
}

/* ===== FOOTER ===== */
footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-logo h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* ===== MODAL STYLES ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    position: relative;
    animation: modalAppear 0.3s ease;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: #e74c3c;
}

.modal-content h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    text-align: center;
}

.modal-content p {
    color: #555;
    margin-bottom: 1.5rem;
    text-align: center;
}

.form-codigo {
    margin-top: 20px;
}

.form-codigo input {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    border: 2px solid #3498db;
    border-radius: 8px;
    font-size: 18px;
    text-align: center;
    letter-spacing: 3px;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

.form-codigo input:focus {
    outline: none;
    border-color: #2980b9;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.btn-validar {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-validar:hover:not(:disabled) {
    background: linear-gradient(135deg, #27ae60, #219653);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(46, 204, 113, 0.3);
}

.btn-validar:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.mensaje-error {
    display: none;
    padding: 12px;
    margin-top: 15px;
    border-radius: 6px;
    text-align: center;
    font-weight: bold;
}

.mensaje-error.error {
    background-color: #ffeaea;
    color: #e74c3c;
    border: 1px solid #e74c3c;
}

.mensaje-error.exito {
    background-color: #eaffea;
    color: #2ecc71;
    border: 1px solid #2ecc71;
}

.vibrar {
    animation: vibrar 0.5s ease;
}

@keyframes vibrar {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .info-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .download-container .btn,
    .download-container .btn2,
    .download-container .btn3,
    .download-container .btn4 {
        display: block;
        margin: 10px auto;
        width: 90%;
        max-width: 300px;
    }
    
    .modal-content {
        margin: 20% auto;
        padding: 20px;
    }
    
    nav ul {
        justify-content: center;
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .hero h1 {
        font-size: 1.6rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
}

/* ===== UTILITY CLASSES ===== */
.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: 2rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

.hidden {
    display: none;
}

/* ===== LOADING STATES ===== */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.btn-loading {
    position: relative;
    color: transparent;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-right-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}