/* Estilos Modernos para Cecontec */
:root {
    --primary: #0654e6;
    --primary-dark: #0548c4;
    --secondary: #0ea5e9;
    --dark: #1e293b;
    --light: #f8fafc;
    --gray: #64748b;
    --light-gray: #f1f5f9;
    --spinner-size: 3rem;
    --back-to-top-size: 50px;
}

body {
    font-family: 'Nunito', sans-serif;
    color: var(--dark);
    line-height: 1.7;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    line-height: 1.3;
}

.btn {
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(6, 84, 230, 0.3);
}

.btn-outline-light:hover {
    color: var(--primary);
    background-color: white;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, rgba(6, 84, 230, 0.9), rgba(14, 165, 233, 0.9)), url('../img/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    padding: 8rem 0;
    position: relative;
    overflow: hidden;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

/* Features Section */
.features {
    padding: 6rem 0;
    background-color: var(--light-gray);
}

.feature-card {
    background: white;
    border-radius: 1rem;
    padding: 2.5rem 2rem;
    height: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: rgba(6, 84, 230, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--primary);
    font-size: 1.75rem;
}

/* Programs Section */
.programs {
    padding: 6rem 0;
}

.program-card {
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    margin-bottom: 2rem;
    background: white;
    height: 100%;
}

.program-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.program-img {
    height: 200px;
    width: 100%;
    object-fit: cover;
}

.program-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    height: calc(100% - 200px);
}

/* Testimonials */
.testimonials {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 6rem 0;
}

.testimonial-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin: 1rem 0;
    position: relative;
    height: 100%;
}

.testimonial-card::before {
    content: '"';
    font-family: serif;
    font-size: 5rem;
    position: absolute;
    top: -1.5rem;
    left: 1rem;
    color: var(--primary);
    opacity: 0.1;
    line-height: 1;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.cta-section p {
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto 2.5rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

/* Footer */
.footer {
    background-color: var(--dark);
    color: white;
    padding: 5rem 0 2rem;
}

.footer h5 {
    color: white;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.footer ul {
    list-style: none;
    padding: 0;
}

.footer ul li {
    margin-bottom: 0.75rem;
}

.footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer a:hover {
    color: white;
    padding-left: 5px;
}

.footer .social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    margin-right: 10px;
    color: white;
    transition: all 0.3s ease;
}

.footer .social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .feature-card, 
    .program-card, 
    .testimonial-card {
        margin-bottom: 1.5rem;
    }
    
    .footer {
        text-align: center;
    }
    
    .footer .social-links {
        justify-content: center;
        margin-top: 1.5rem;
    }
}

/* Spinner */
.spinner-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner-border {
    width: var(--spinner-size);
    height: var(--spinner-size);
}

/* Back to top button */
.back-to-top {
    width: var(--back-to-top-size);
    height: var(--back-to-top-size);
    display: none !important;
    z-index: 99;
}

.back-to-top.visible {
    display: flex !important;
    animation: fadeInUp 0.3s ease-out;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Loading Spinner */
#spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

#spinner.fade-out {
    opacity: 0;
    pointer-events: none;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
    color: var(--primary);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Form Styles */
.form-control,
.form-select {
    border: none;
    border-bottom: 2px solid #e2e8f0;
    border-radius: 0;
    padding: 0.75rem 0;
    background-color: transparent;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: none;
}

.form-control:focus,
.form-select:focus {
    border-bottom-color: var(--primary);
    box-shadow: none;
    background-color: transparent;
    color: var(--dark);
}

.form-control::placeholder {
    color: #cbd5e1;
}

.form-floating > label {
    color: #94a3b8;
    font-weight: 500;
    font-size: 0.95rem;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-select:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label,
.form-floating > .form-select:not(:placeholder-shown) ~ label {
    color: var(--primary);
    font-weight: 600;
}

.form-floating > .form-control:focus,
.form-floating > .form-select:focus {
    padding-top: 1.625rem;
    padding-bottom: 0.625rem;
}

/* Form validation styles */
.form-control.is-invalid,
.form-select.is-invalid {
    border-bottom-color: #dc2626;
}

.invalid-feedback {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

/* Contact form styling */
.contact-form .form-group {
    margin-bottom: 1.5rem;
}

.contact-form .btn {
    padding: 0.75rem 2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.alert {
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
}

.alert-danger {
    background-color: #fee2e2;
    color: #7f1d1d;
}

.alert ul {
    margin: 0;
    padding-left: 1.5rem;
}

.alert li {
    margin-bottom: 0.25rem;
}

/* Section Title */
.section-title {
    margin-bottom: 2rem;
}

.section-title h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark);
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary);
    margin-top: 1rem;
}
