/* ===== VARIABLES ===== */
:root {
    --primary-color: #4a6f8a;
    --primary-dark: #3d5a6f;
    --primary-light: #5d8299;
    --text-color: #333;
    --text-light: #666;
    --white: #ffffff;
    --gray-bg: #e8e8e8;
    --footer-bg: #5a7a8f;
}

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* ===== HEADER ===== */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 20px 0;
    position: relative;
}

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

.nav-menu {
    display: flex;
    justify-content: center;
    gap: 40px;
}

.nav-menu a {
    color: var(--white);
    font-size: 18px;
    padding: 10px 15px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #7ec8e3;
}

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 2px;
    background-color: #7ec8e3;
}

/* ===== HERO ===== */
.hero {
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/hero-bg.svg') center/cover no-repeat;
    opacity: 0.3;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    max-width: 800px;
    margin: -100px auto 0;
    background-color: var(--white);
    padding: 40px 60px 60px;
    position: relative;
    z-index: 10;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

/* ===== SERVICE CARDS ===== */
.service-cards {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

.card-link {
    text-decoration: none;
}

.card {
    width: 200px;
    height: 180px;
    border-radius: 5px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
}

/* ===== WELCOME SECTION ===== */
.welcome-section {
    text-align: center;
    margin-bottom: 50px;
}

.welcome-title {
    color: var(--primary-color);
    font-size: 32px;
    font-weight: normal;
    font-style: italic;
    margin-bottom: 30px;
}

.welcome-image {
    margin-bottom: 30px;
    border-radius: 5px;
    overflow: hidden;
}

.welcome-image img {
    width: 100%;
    max-width: 450px;
    border-radius: 5px;
}

.welcome-text {
    color: var(--text-color);
    font-size: 15px;
    line-height: 1.8;
    text-align: justify;
}

/* ===== SERVICES SECTION ===== */
.services-section {
    display: flex;
    gap: 40px;
    padding-top: 30px;
}

.service-item {
    flex: 1;
}

.service-icon {
    color: var(--primary-color);
    font-size: 50px;
    margin-bottom: 15px;
}

.service-icon img {
    width: 70px;
    height: 70px;
}

.service-title {
    color: var(--primary-color);
    font-size: 20px;
    font-weight: normal;
    margin-bottom: 15px;
}

.service-divider {
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), transparent);
    margin-bottom: 20px;
}

.service-description {
    font-size: 14px;
    line-height: 1.8;
    text-align: justify;
    color: var(--text-color);
}

.conocenos {
    color: var(--primary-color);
}

.clic-aqui {
    color: var(--primary-light);
}

.clic-aqui:hover {
    text-decoration: underline;
}

/* ===== ABOUT SECTION (Nosotros) ===== */
.about-section {
    text-align: center;
}

.about-title {
    color: var(--primary-color);
    font-size: 32px;
    font-weight: normal;
    margin-bottom: 20px;
    text-decoration: underline;
    text-underline-offset: 10px;
}

.about-subtitle {
    color: var(--text-color);
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 50px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.features-container {
    display: flex;
    gap: 40px;
    justify-content: center;
}

.feature-item {
    flex: 1;
    max-width: 220px;
    text-align: center;
}

.feature-icon {
    color: var(--primary-color);
    font-size: 60px;
    margin-bottom: 20px;
}

.feature-text {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-color);
}

/* ===== CONTACT SECTION ===== */
.contact-section {
    text-align: center;
}

.contact-title {
    color: var(--primary-color);
    font-size: 32px;
    font-weight: normal;
    margin-bottom: 20px;
    text-decoration: underline;
    text-underline-offset: 10px;
}

.contact-subtitle {
    color: var(--text-color);
    font-size: 15px;
    margin-bottom: 40px;
}

.contact-container {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin-bottom: 50px;
}

.contact-card {
    flex: 1;
    max-width: 200px;
    padding: 30px 20px;
    background: #f9f9f9;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
}

.contact-card-icon {
    color: var(--primary-color);
    font-size: 40px;
    margin-bottom: 15px;
}

.contact-card h3 {
    color: var(--primary-color);
    font-size: 16px;
    margin-bottom: 15px;
}

.contact-card p {
    font-size: 13px;
    color: var(--text-color);
    margin-bottom: 5px;
}

.contact-card a {
    color: var(--primary-color);
}

.contact-card a:hover {
    text-decoration: underline;
}

/* Contact Form */
.contact-form-container {
    max-width: 500px;
    margin: 0 auto;
    padding-top: 30px;
    border-top: 1px solid #ddd;
}

.contact-form-container h2 {
    color: var(--primary-color);
    font-size: 22px;
    font-weight: normal;
    margin-bottom: 25px;
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn-submit {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 12px 40px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-submit:hover {
    background: var(--primary-dark);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--footer-bg);
    color: var(--white);
    padding: 40px 20px 20px;
    margin-top: 60px;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.footer-contact {
    display: flex;
    justify-content: space-around;
    margin-bottom: 30px;
}

.contact-email,
.contact-phone {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.contact-email > i,
.contact-phone > i {
    font-size: 30px;
    margin-top: 5px;
}

.contact-info a,
.contact-info p {
    display: block;
    font-size: 14px;
    margin-bottom: 5px;
    color: var(--white);
}

.contact-info a:hover {
    text-decoration: underline;
}

.location {
    margin-top: 10px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.2);
    max-width: 800px;
    margin: 0 auto;
}

.footer-links a {
    font-size: 13px;
    color: rgba(255,255,255,0.8);
}

.footer-links a:hover {
    color: var(--white);
}

.login-link {
    font-size: 13px;
    color: rgba(255,255,255,0.8);
}

.login-link:hover {
    color: var(--white);
}

/* ===== BACK TO TOP ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 40px;
    height: 40px;
    background: rgba(0,0,0,0.3);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.back-to-top:hover {
    background: var(--primary-color);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .main-content {
        margin: -50px 20px 0;
        padding: 30px;
    }

    .service-cards {
        flex-direction: column;
        align-items: center;
    }

    .services-section {
        flex-direction: column;
    }

    .features-container {
        flex-direction: column;
        align-items: center;
    }

    .feature-item {
        max-width: 100%;
    }

    .contact-container {
        flex-direction: column;
        align-items: center;
    }

    .contact-card {
        max-width: 100%;
        width: 100%;
    }

    .footer-contact {
        flex-direction: column;
        gap: 30px;
        align-items: center;
        text-align: center;
    }

    .contact-email,
    .contact-phone {
        flex-direction: column;
        align-items: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .nav-menu {
        gap: 20px;
    }

    .nav-menu a {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .welcome-title,
    .about-title,
    .contact-title {
        font-size: 24px;
    }

    .card {
        width: 180px;
        height: 160px;
    }
}
