@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&family=Playfair+Display:ital,wght@0,600;1,600&display=swap');

:root {
    --primary-color: #4a148c; /* Morado profundo */
    --primary-light: #7c43bd; /* Morado claro */
    --primary-dark: #12005e; /* Morado oscuro */
    --secondary-color: #ac751a; /* Dorado */
    --secondary-light: #e1a44c; /* Dorado claro */
    --bg-color: #e0d9c6; /* Crema/Beige */
    --bg-light: #f5f2eb;
    --text-color: #2c2c2c;
    --white: #ffffff;
    --shadow-soft: 0 10px 30px rgba(74, 20, 140, 0.08);
    --shadow-strong: 0 20px 40px rgba(172, 117, 26, 0.15);
    --transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-light);
    color: var(--text-color);
    font-family: 'Outfit', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, .logo-text {
    font-family: 'Playfair Display', serif;
}

/* Navbar */
header {
    background: rgba(74, 20, 140, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--white);
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: var(--transition);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
}

.logo-img {
    height: 50px;
    width: auto;
    transition: var(--transition);
}

.logo-container:hover .logo-img {
    transform: scale(1.05);
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--secondary-light);
    letter-spacing: 1px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 25px;
    align-items: center;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-weight: 400;
    font-size: 1.1rem;
    position: relative;
    padding: 5px 0;
    transition: var(--transition);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--secondary-light);
    transition: var(--transition);
}

.nav-links a:not(.btn):hover::after {
    width: 100%;
}

.nav-links a:not(.btn):hover {
    color: var(--secondary-light);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-light) 100%);
    color: var(--white) !important;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(172, 117, 26, 0.4);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(172, 117, 26, 0.6);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color) !important;
    box-shadow: none;
}

.btn-outline:hover {
    background: var(--secondary-color);
    color: var(--white) !important;
}

/* Hero Section */
.hero {
    position: relative;
    background-image: url('../imagenes/portada.png');
    background-size: cover;
    background-position: center 30%;
    background-attachment: fixed;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--white);
    padding: 20px;
    margin-top: 0;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(18, 0, 94, 0.8), rgba(74, 20, 140, 0.5));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    animation: fadeInUp 1s ease forwards;
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 20px rgba(0,0,0,0.6);
    line-height: 1.1;
    color: var(--secondary-light);
}

.hero p {
    font-size: 1.4rem;
    font-weight: 300;
    margin-bottom: 2.5rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

/* Sections */
.section {
    max-width: 1200px;
    margin: 6rem auto;
    padding: 0 20px;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    color: var(--primary-dark);
    font-size: 2.2rem;
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.section-header h2::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color), transparent);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

/* Grid & Cards */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
}

.card {
    background-color: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    border: 1px solid rgba(224, 217, 198, 0.5);
    position: relative;
    top: 0;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-strong);
}

.card-img-wrapper {
    height: 250px;
    overflow: hidden;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.card:hover .card-img {
    transform: scale(1.1);
}

.card-content {
    padding: 35px 25px;
    text-align: center;
}

.card-content h3 {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.card-content p {
    color: #666;
    font-size: 1.05rem;
}

/* Call to Action Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-light) 100%);
    padding: 5rem 20px;
    border-radius: 30px;
    color: var(--white);
    text-align: center;
    box-shadow: 0 15px 40px rgba(74, 20, 140, 0.3);
    margin-bottom: 6rem;
    position: relative;
    overflow: hidden;
}

.cta-section::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(172,117,26,0.2) 0%, transparent 70%);
    border-radius: 50%;
}

.cta-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: 2.2rem;
    color: var(--secondary-light);
    margin-bottom: 20px;
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 35px;
    opacity: 0.9;
}

/* Form Styles */
.form-wrapper {
    padding: 120px 20px 60px;
    min-height: 100vh;
    background: linear-gradient(to bottom, var(--bg-light), var(--bg-color));
}

.form-title {
    text-align: center;
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 40px;
    font-family: 'Playfair Display', serif;
}

.form-row {
    display: flex;
    gap: 30px;
    margin-bottom: 25px;
}

.form-group {
    flex: 1;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--primary-dark);
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #eaeaea;
    border-radius: 12px;
    font-size: 1.05rem;
    transition: var(--transition);
    background-color: var(--white);
    color: var(--text-color);
    font-family: 'Outfit', sans-serif;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(124, 67, 189, 0.1);
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234a148c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 15px;
}

.form-control:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Footer */
footer {
    background-color: var(--primary-dark);
    color: var(--bg-color);
    text-align: center;
    padding: 30px 20px;
    font-size: 1rem;
    border-top: 4px solid var(--secondary-color);
}

/* Hamburger Menu */
.menu-toggle {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.8rem;
    padding: 5px;
}

/* Form Layout with Image */
.form-page-layout {
    display: flex;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    box-shadow: var(--shadow-strong);
    overflow: hidden;
    max-width: 1100px;
    margin: 0 auto;
    border: 1px solid rgba(255,255,255,0.5);
}

.form-image-side {
    flex: 1;
    min-width: 300px;
    background-image: url('../imagenes/imagen1.png');
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-image-content {
    position: relative;
    z-index: 2;
    color: var(--white);
    text-align: center;
    padding: 40px;
}

.form-container {
    flex: 2;
    min-width: 320px;
    padding: 50px;
    background: transparent;
    box-shadow: none;
    border: none;
    margin: 0;
}

.form-wrapper {
    padding: 120px 20px 60px;
    min-height: 100vh;
    background: linear-gradient(to bottom, var(--bg-light), var(--bg-color));
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.8s ease forwards;
}

/* Custom Alertify Theme */
.alertify .ajs-dialog {
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(74, 20, 140, 0.4);
    border: 2px solid var(--primary-light);
}
.alertify .ajs-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    color: var(--white);
    border-radius: 12px 12px 0 0;
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    text-align: center;
    border-bottom: 2px solid var(--secondary-color);
}
.alertify .ajs-body .ajs-content {
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    color: var(--text-color);
    text-align: center;
    padding: 25px;
}
.alertify .ajs-footer {
    background: var(--bg-light);
    border-radius: 0 0 12px 12px;
    padding: 15px;
    text-align: center;
}
.alertify .ajs-footer .ajs-buttons .ajs-button {
    border-radius: 50px;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    padding: 10px 25px;
    text-transform: none;
    transition: var(--transition);
    margin: 0 10px;
}
.alertify .ajs-footer .ajs-buttons .ajs-button.ajs-ok {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-light) 100%);
    color: var(--white);
    border: none;
}
.alertify .ajs-footer .ajs-buttons .ajs-button.ajs-ok:hover {
    box-shadow: 0 5px 15px rgba(172, 117, 26, 0.4);
    transform: translateY(-2px);
}
.alertify .ajs-footer .ajs-buttons .ajs-button.ajs-cancel {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}
.alertify .ajs-footer .ajs-buttons .ajs-button.ajs-cancel:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* Responsive */
@media (max-width: 992px) {
    .hero h1 { font-size: 2.2rem; }
}

@media (max-width: 768px) {
    html {
        font-size: 14px; /* Reduce global text size on mobile */
    }
    .form-image-side {
        width: 100%;
        height: 250px;
        flex: none;
        background-image: url('../imagenes/imagen5.png');
    }
    .menu-toggle {
        display: block;
    }
    
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background: rgba(74, 20, 140, 0.98);
        padding: 20px 0;
        text-align: center;
        box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin-bottom: 15px;
    }
    
    .nav-links a::after {
        display: none;
    }
    
    .form-row {
        flex-direction: column;
        gap: 25px;
        margin-bottom: 25px;
    }
    
    .hero h1 { font-size: 1.6rem; }
    .hero p { font-size: 1rem; }
    
    .section-header h2 { font-size: 2.2rem; }
    .cta-content h2 { font-size: 2rem; }
    
    .form-container {
        padding: 30px 20px;
    }
}
