﻿/* Header de Áreas de Trabajo */
.areas-header {
    text-align: center;
    padding: 50px 0 40px;
    margin-bottom: 50px;
    position: relative;
    background: linear-gradient(135deg, #1a5c36 0%, #2c7a4d 100%);
    color: white;
}

    .areas-header h1 {
        font-size: clamp(2.5rem, 5vw, 3.5rem);
        font-weight: 800;
        letter-spacing: 2px;
        text-transform: uppercase;
        position: relative;
        z-index: 1;
        margin-bottom: 20px;
    }

        .areas-header h1::after {
            content: '';
            position: absolute;
            bottom: -15px;
            left: 50%;
            transform: translateX(-50%);
            width: 120px;
            height: 4px;
            background: linear-gradient(90deg, transparent, var(--light-green), transparent);
            border-radius: 2px;
        }

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Descripción mejorada */
.description {
    max-width: 100%;
    margin: 0 auto 50px;
    background-color: #f1f8e9;
    border-radius: 15px;
    padding: 50px 60px;
    box-shadow: 0 10px 30px rgba(30, 132, 73, 0.15);
    border: 1px solid #c8e6c9;
    position: relative;
    overflow: hidden;
}

    .description::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 8px;
        height: 100%;
        background: linear-gradient(to bottom, #27ae60, #2ecc71, #27ae60);
    }

    .description p {
        font-size: 1.4rem;
        text-align: justify;
        color: #2c3e50;
        line-height: 1.8;
        margin: 0;
    }

/* Grid de cards */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.card {
    background-color: #e0f2e1;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid #c8e6c9;
}

    .card:hover {
        transform: translateY(-10px);
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    }

/* Bordes VERDES para cada card */
.card-1 {
    border-top: 5px solid #1e8449;
}

.card-2 {
    border-top: 5px solid #229954;
}

.card-3 {
    border-top: 5px solid #148f77;
}

.card-4 {
    border-top: 5px solid #117a65;
}

.card-5 {
    border-top: 5px solid #1e8449;
}

.card-6 {
    border-top: 5px solid #229954;
}

.card-7 {
    border-top: 5px solid #148f77;
}

.card-8 {
    border-top: 5px solid #117a65;
}

.card-9 {
    border-top: 5px solid #1e8449;
}

/* Efecto hover para fondos */
.card-1:hover {
    background-color: #d4e6d5;
}

.card-2:hover {
    background-color: #d5f4e6;
}

.card-3:hover {
    background-color: #d1f2eb;
}

.card-4:hover {
    background-color: #c2e4d6;
}

.card-5:hover {
    background-color: #d4e6d5;
}

.card-6:hover {
    background-color: #d5f4e6;
}

.card-7:hover {
    background-color: #d1f2eb;
}

.card-8:hover {
    background-color: #c2e4d6;
}

.card-9:hover {
    background-color: #d4e6d5;
}

.card-image {
    height: 200px;
    overflow: hidden;
    background-color: #c8e6c9;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: all 0.3s ease;
}

.card:hover .card-image {
    background-color: #b2dfdb;
}

.card-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.areas-card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background-color: #e8f5e9;
}

.card-title {
    font-size: clamp(1.2rem, 1.8vw, 1.5rem);
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 700;
    text-align: center;
    line-height: 1.3;
}

.card-text {
    color: #333;
    margin-bottom: 20px;
    flex-grow: 1;
    line-height: 1.7;
    font-size: clamp(0.95rem, 1.2vw, 1rem);
}

.card-button {
    display: block;
    width: 100%;
    padding: 12px 20px;
    background-color: #27ae60;
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: clamp(0.9rem, 1.1vw, 1rem);
    letter-spacing: 0.5px;
}

    .card-button:hover {
        background-color: #1e8449;
        transform: scale(1.02);
        box-shadow: 0 5px 15px rgba(30, 132, 73, 0.4);
    }

/* Efecto hover específico para cada card */
.card-1 .card-button:hover {
    background-color: #1e8449;
    box-shadow: 0 5px 15px rgba(30, 132, 73, 0.4);
}

.card-2 .card-button:hover {
    background-color: #229954;
    box-shadow: 0 5px 15px rgba(34, 153, 84, 0.4);
}

.card-3 .card-button:hover {
    background-color: #148f77;
    box-shadow: 0 5px 15px rgba(20, 143, 119, 0.4);
}

.card-4 .card-button:hover {
    background-color: #117a65;
    box-shadow: 0 5px 15px rgba(17, 122, 101, 0.4);
}

.card-5 .card-button:hover {
    background-color: #1e8449;
    box-shadow: 0 5px 15px rgba(30, 132, 73, 0.4);
}

.card-6 .card-button:hover {
    background-color: #229954;
    box-shadow: 0 5px 15px rgba(34, 153, 84, 0.4);
}

.card-7 .card-button:hover {
    background-color: #148f77;
    box-shadow: 0 5px 15px rgba(20, 143, 119, 0.4);
}

.card-8 .card-button:hover {
    background-color: #117a65;
    box-shadow: 0 5px 15px rgba(17, 122, 101, 0.4);
}

.card-9 .card-button:hover {
    background-color: #1e8449;
    box-shadow: 0 5px 15px rgba(30, 132, 73, 0.4);
}

/* Responsividad */
@media (max-width: 1200px) {
    .cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 25px;
    }

    .card-image {
        height: 180px;
        padding: 15px;
    }

    .areas-card-content {
        padding: 20px;
    }
}

@media (max-width: 992px) {
    .cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 20px;
    }

    .card-image {
        height: 170px;
        padding: 15px;
    }
}

@media (max-width: 768px) {
    .areas-header {
        padding: 40px 0 30px;
        margin-bottom: 40px;
    }

        .areas-header h1 {
            font-size: 2.5rem;
        }

    .description {
        padding: 20px;
        margin-bottom: 40px;
    }

    .cards-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }

    .card-image {
        height: 180px;
        padding: 15px;
    }

    .areas-card-content {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .areas-header {
        padding: 15px 0 10px;
    }

        .areas-header h1 {
            font-size: 1.8rem;
            letter-spacing: 0.5px;
        }

    .description {
        padding: 15px;
        margin-bottom: 30px;
    }

    .cards-grid {
        gap: 15px;
    }

    .card-image {
        height: 160px;
        padding: 10px;
    }

    .areas-card-content {
        padding: 15px;
    }

    .card-button {
        padding: 10px 15px;
    }
}
