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

:root {
    --primary-color: #18a1ca;
    --secondary-color: #f39c12;
    --text-dark: #333;
    --text-light: #666;
    --bg-light: #f8f9fa;
    --border-color: #ddd;
    --danger-color: #e74c3c;
    --success-color: #27ae60;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
}

/* TOP BAR */
.top-bar {
    background-color: var(--primary-color);
    color: white;
    padding: 12px 0;
    font-size: 14px;
}

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

.top-bar-left {
    display: flex;
    gap: 30px;
    align-items: center;
}

.top-bar-left a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.3s;
}

.top-bar-left a:hover {
    opacity: 0.8;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    color: white;
    font-size: 16px;
}

/* NAVBAR */
header {
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* LOGO IMAGE */
.logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
    display: block;
}

.logo-img:not([src]) {
    display: none;
}

.logo i {
    font-size: 28px;
}

.nav-menu {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-menu > li {
    position: relative;
    padding-bottom: 15px;
}

.nav-menu a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    min-width: 250px;
    display: none;
    list-style: none;
    margin-top: 0;
    padding-top: 15px;
    padding-bottom: 5px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.nav-menu li:hover .submenu {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.submenu li {
    padding: 0;
}

.submenu a {
    display: block;
    padding: 12px 20px;
    color: var(--text-dark);
    font-weight: normal;
    border-bottom: 1px solid var(--border-color);
}

.submenu a:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    margin: 5px 0;
    transition: 0.3s;
}

/* HERO SECTION - CAROUSEL */
.hero {
    position: relative;
    height: 500px;
    background: linear-gradient(135deg, var(--primary-color) 0%, rgba(44, 127, 62, 0.8) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
}

.hero-slide.active {
    opacity: 1;
}

/* OVERLAY para el hero - para que el texto se vea sobre la imagen */
.hero-slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.hero-content {
    text-align: center;
    z-index: 2;
    max-width: 600px;
    padding: 20px;
    position: relative;
}

.hero-content h1 {
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-content p {
    font-size: 18px;
    margin-bottom: 30px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
    font-weight: 600;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #e67e22;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-secondary {
    background-color: white;
    color: var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--bg-light);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.carousel-nav {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 3;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: background 0.3s;
}

.carousel-dot.active {
    background: white;
    width: 30px;
    border-radius: 6px;
}

/* SERVICES SECTION */
.services {
    background: var(--bg-light);
    padding: 80px 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.service-card {
    text-align: center;
    padding: 30px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.service-card i {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.service-card h3 {
    color: var(--text-dark);
    margin-bottom: 15px;
    font-size: 20px;
}

.service-card p {
    color: var(--text-light);
    font-size: 14px;
}

.section-title {
    text-align: center;
    font-size: 36px;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 40px;
    font-size: 16px;
}

/* CLIENTS SECTION */
.clients {
    padding: 80px 20px;
    background: white;
}

.clients-carousel {
    display: flex;
    gap: 40px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 50px;
}

.client-logo {
    width: 150px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    border-radius: 10px;
    font-weight: bold;
    color: var(--text-light);
    text-align: center;
    padding: 20px;
    transition: all 0.3s;
    overflow: hidden;
}

.client-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.client-logo:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

.client-logo:hover img {
    filter: brightness(2);
}

/* BLOG SECTION */
.blog {
    background: var(--bg-light);
    padding: 80px 20px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.blog-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.blog-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e5a2f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: white;
    overflow: hidden;
    object-fit: cover;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.blog-content {
    padding: 25px;
}

.blog-date {
    color: var(--secondary-color);
    font-size: 12px;
    margin-bottom: 10px;
}

.blog-card h3 {
    margin-bottom: 15px;
    font-size: 18px;
    color: var(--text-dark);
}

.blog-card p {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.6;
}

.read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: gap 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.read-more:hover {
    gap: 10px;
}

/* TESTIMONIALS SECTION */
.testimonials {
    background: white;
    padding: 80px 20px;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.testimonial-card {
    background: var(--bg-light);
    padding: 30px;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
}

.rating {
    color: var(--secondary-color);
    margin-bottom: 15px;
    font-size: 14px;
}

.testimonial-text {
    color: var(--text-light);
    margin-bottom: 15px;
    font-style: italic;
    line-height: 1.6;
}

.testimonial-author {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.testimonial-date {
    font-size: 12px;
    color: var(--text-light);
}

/* FOOTER */
footer {
    background: var(--text-dark);
    color: white;
    padding: 60px 20px 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.footer-section h3 {
    margin-bottom: 20px;
    font-size: 18px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--secondary-color);
}

.footer-section p {
    color: #ccc;
    line-height: 1.8;
    font-size: 14px;
}

.footer-bottom {
    border-top: 1px solid #444;
    padding-top: 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
    max-width: 1200px;
    margin: 0 auto;
}

/* 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);
    animation: fadeIn 0.3s;
    overflow-y: auto;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: white;
    margin: 50px auto;
    padding: 30px;
    border-radius: 10px;
    width: calc(100% - 40px);
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: slideIn 0.3s;
    box-sizing: border-box;
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close {
    color: var(--text-light);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: var(--text-dark);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-weight: 600;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 14px;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(44, 127, 62, 0.3);
}

/* PAGO STYLES */
.pago-opciones {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 20px 0;
}

.pago-opcion {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s;
}

.pago-opcion:hover {
    border-color: var(--primary-color);
    background-color: var(--bg-light);
}

.pago-opcion.active {
    border-color: var(--primary-color);
    background-color: rgba(44, 127, 62, 0.1);
}

.pago-opcion i {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.pago-opcion h4 {
    margin: 10px 0;
    color: var(--text-dark);
}

.pago-opcion p {
    font-size: 12px;
    color: var(--text-light);
}

.pago-resumen {
    background: var(--bg-light);
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.pago-resumen-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.pago-resumen-row.total {
    border: none;
    font-weight: bold;
    font-size: 16px;
    color: var(--primary-color);
}

.webpay-info {
    background: #e8f4f8;
    border-left: 4px solid #3498db;
    padding: 15px;
    margin: 15px 0;
    border-radius: 4px;
    font-size: 13px;
    color: var(--text-dark);
}

.webpay-info i {
    color: #3498db;
    margin-right: 8px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .nav-menu.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: white;
        padding: 20px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }

    .hero-content h1 {
        font-size: 32px;
    }

    .hero-content p {
        font-size: 16px;
    }

    .top-bar-left {
        flex-direction: column;
        gap: 10px;
    }

    .services-grid, .blog-grid, .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .pago-opciones {
        grid-template-columns: 1fr;
    }

    .modal-content {
        margin: 20px auto;
        width: 95%;
    }
}

/* LOADER */
.loader {
    border: 4px solid var(--bg-light);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ALERT STYLES */
.alert {
    padding: 15px;
    margin: 15px 0;
    border-radius: 5px;
    display: none;
}

.alert.show {
    display: block;
}

.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert-info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* MODAL DE POSTULACIÓN */
.postulacion-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s;
    overflow-y: auto;
}

.postulacion-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.postulacion-modal-content {
    background-color: white;
    border-radius: 15px;
    width: 90%;
    max-width: 520px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.postulacion-modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 32px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 10;
}

.postulacion-modal-close:hover {
    color: var(--primary-color);
}

.postulacion-modal-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e5a2f 100%);
    color: white;
    padding: 30px 25px;
    border-radius: 15px 15px 0 0;
    text-align: center;
}

.postulacion-modal-icon {
    font-size: 40px;
    margin-bottom: 12px;
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    width: 65px;
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.postulacion-modal-header h2 {
    font-size: 23px;
    margin-bottom: 5px;
    font-weight: 600;
}

.postulacion-modal-header p {
    font-size: 12px;
    opacity: 0.9;
}

.postulacion-modal-body {
    padding: 30px 25px;
}

.postulacion-intro {
    text-align: center;
    font-size: 14px;
    color: #555;
    margin-bottom: 25px;
    line-height: 1.5;
}

.postulacion-opciones {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.postulacion-opcion {
    background: #f9f9f9;
    border: 2px solid #f0f0f0;
    border-radius: 10px;
    padding: 18px;
    transition: all 0.3s ease;
    text-align: center;
}

.postulacion-opcion:hover {
    border-color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(44, 127, 62, 0.1);
    transform: translateY(-5px);
}

.postulacion-opcion-icon {
    font-size: 35px;
    color: var(--primary-color);
    margin-bottom: 10px;
    display: block;
}

.postulacion-opcion h3 {
    color: var(--primary-color);
    margin-bottom: 6px;
    font-size: 16px;
    font-weight: 600;
}

.postulacion-opcion-desc {
    color: #666;
    font-size: 12px;
    margin-bottom: 15px;
}

.postulacion-datos {
    background: white;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 12px;
    text-align: left;
}

.postulacion-dato-item {
    margin-bottom: 8px;
}

.postulacion-dato-item:last-child {
    margin-bottom: 0;
}

.postulacion-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
}

.postulacion-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    word-break: break-all;
    transition: color 0.3s;
}

.postulacion-link:hover {
    color: #1e5a2f;
    text-decoration: underline;
}

.postulacion-opcion code {
    background: #f0f0f0;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    color: #333;
    display: block;
    word-break: break-all;
    font-weight: 500;
}

.postulacion-lista {
    list-style: none;
    padding: 0;
    margin: 0;
}

.postulacion-lista li {
    padding: 5px 0;
    color: #555;
    font-size: 13px;
    display: flex;
    align-items: center;
}

.postulacion-lista li:before {
    content: "✓";
    color: var(--primary-color);
    font-weight: bold;
    margin-right: 8px;
}

.postulacion-btn {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.postulacion-btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.postulacion-btn-primary:hover {
    background-color: #1e5a2f;
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(44, 127, 62, 0.3);
}

.postulacion-btn-secondary {
    background-color: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.postulacion-btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(44, 127, 62, 0.3);
}

.postulacion-contacto {
    background: linear-gradient(135deg, rgba(44, 127, 62, 0.1) 0%, rgba(243, 156, 18, 0.05) 100%);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    color: #333;
}

.postulacion-contacto i {
    color: var(--primary-color);
    font-size: 20px;
    margin-bottom: 8px;
    display: block;
}

.postulacion-contacto p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .postulacion-opciones {
        grid-template-columns: 1fr;
    }

    .postulacion-modal-content {
        width: calc(100% - 20px);
        margin: 20px 10px;
    }

    .postulacion-modal-header {
        padding: 25px 20px;
    }

    .postulacion-modal-body {
        padding: 20px 18px;
    }

    .postulacion-modal-header h2 {
        font-size: 20px;
    }
}
