/* ===== ESTILOS GLOBALES Y VARIABLES ===== */
:root {
    --primary-color: #1a3a5f;
    --secondary-color: #2c5282;
    --accent-color: #3182ce;
    --accent-hover: #2c5282;
    --text-color: #2d3748;
    --light-text: #718096;
    --bg-light: #f7fafc;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-white);
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== TIPOGRAFÍA ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }

p {
    margin-bottom: 1rem;
    color: var(--light-text);
}

a {
    text-decoration: none;
    color: var(--accent-color);
    transition: var(--transition);
}

a:hover {
    color: var(--accent-hover);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

section {
    padding: 80px 0;
}

/* ===== BOTONES ===== */
.btn {
    display: inline-block;
    padding: 14px 28px;
    background-color: var(--accent-color);
    color: var(--bg-white);
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    background-color: var(--accent-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* ===== BOTÓN FLOTANTE DE WHATSAPP ===== */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    background-color: #128c7e;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Ajuste para móviles */
@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
        font-size: 28px;
    }
}

/* ===== HEADER Y NAVEGACIÓN ===== */
header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo a {
    color: inherit;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-color);
    font-weight: 500;
    font-size: 1rem;
    position: relative;
    padding: 0.5rem 0;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--accent-color);
    transition: var(--transition);
}

.nav-menu a:hover::after {
    width: 80%;
    left: 10%;
}

.cta-button {
    background-color: var(--accent-color);
    color: var(--bg-white);
    padding: 10px 20px;
    border-radius: 6px;
    box-shadow: var(--shadow-sm);
}

.cta-button:hover {
    background-color: var(--accent-hover);
    color: white;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 3px auto;
    background-color: var(--primary-color);
    transition: var(--transition);
    border-radius: 2px;
}

/* ===== HERO SECTION ===== */
.hero {
    background: linear-gradient(rgba(26, 58, 95, 0.85), rgba(26, 58, 95, 0.85)), url('https://picsum.photos/seed/law-office-hero/1920/1080.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    height: 100vh;
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--bg-white);
    margin-top: 80px;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 80%, rgba(49, 130, 206, 0.2) 0%, transparent 50%);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3.5rem;
    color: var(--bg-white);
    margin-bottom: 1.5rem;
    font-weight: 800;
    line-height: 1.1;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
}

/* ===== SECCIONES ===== */
.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
    font-size: 2.5rem;
}

.section-title h2::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 4px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--accent-color);
    border-radius: 2px;
}

.section-title p {
    max-width: 600px;
    margin: 1.5rem auto 0;
    font-size: 1.1rem;
}

/* ===== SERVICIOS ===== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: var(--bg-white);
    border-radius: 12px;
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    text-align: center;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--accent-color), var(--secondary-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.service-icon {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    display: inline-block;
    padding: 1rem;
    border-radius: 50%;
    background-color: rgba(49, 130, 206, 0.1);
}

.service-card h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.service-card p {
    color: var(--light-text);
    line-height: 1.7;
}

/* ===== EXPERIENCIA ===== */
.experience {
    background-color: var(--bg-light);
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item {
    padding: 2rem 1rem;
    background-color: var(--bg-white);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    display: block;
}

.stat-label {
    font-size: 1rem;
    color: var(--light-text);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* ===== CONTACTO RÁPIDO ===== */
.quick-contact {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--bg-white);
    text-align: center;
    padding: 5rem 0;
}

.quick-contact h2 {
    color: var(--bg-white);
    font-size: 2.5rem;
}

.quick-contact p {
    max-width: 700px;
    margin: 1.5rem auto 2.5rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
}

/* ===== UBICACIONES ===== */
.locations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.location-card {
    background-color: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.location-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.location-image {
    height: 220px;
    overflow: hidden;
}

.location-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.location-card:hover .location-image img {
    transform: scale(1.1);
}

.location-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.location-content h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.location-content p {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.location-content p strong {
    color: var(--text-color);
}

.location-content .btn {
    margin-top: auto;
}

/* ===== BLOG ===== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.blog-card {
    background-color: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.blog-image {
    height: 220px;
    overflow: hidden;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-image img {
    transform: scale(1.1);
}

.blog-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--light-text);
}

.blog-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-content h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 1.4rem;
}

.blog-content p {
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

/* ===== FORMULARIO DE CONTACTO ===== */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-form {
    background-color: var(--bg-white);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: var(--transition);
    background-color: var(--bg-light);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    background-color: var(--bg-white);
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem;
    background-color: var(--bg-white);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--accent-color);
}

.contact-info-icon {
    font-size: 1.8rem;
    color: var(--accent-color);
    margin-top: 5px;
}

.contact-info-item h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.contact-info-item p {
    margin-bottom: 0.25rem;
    color: var(--light-text);
}

/* ===== FAQ ===== */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.faq-question {
    background-color: var(--bg-white);
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--text-color);
    transition: var(--transition);
}

.faq-question:hover {
    background-color: var(--bg-light);
}

.faq-question i {
    transition: var(--transition);
}

.faq-answer {
    background-color: var(--bg-white);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-answer p {
    padding: 0 1.5rem 1.5rem;
    color: var(--light-text);
}

/* ===== FOOTER ===== */
footer {
    background-color: var(--primary-color);
    color: var(--bg-white);
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo h3 {
    color: var(--bg-white);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.footer-logo p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
}

.footer-links h3 {
    color: var(--bg-white);
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 10px;
    font-size: 1.2rem;
}

.footer-links h3::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 3px;
    bottom: 0;
    left: 0;
    background-color: var(--accent-color);
    border-radius: 2px;
}

.footer-links ul li {
    margin-bottom: 0.8rem;
}

.footer-links ul li a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.footer-links ul li a:hover {
    color: var(--bg-white);
    padding-left: 5px;
}

.footer-links ul li i {
    margin-right: 0.5rem;
    color: var(--accent-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* ===== ESTILOS ADICIONALES PARA PÁGINAS ESPECÍFICAS ===== */
.page-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--bg-white);
    padding: 120px 0 80px;
    text-align: center;
}

.page-header h1 {
    color: var(--bg-white);
    font-size: 3rem;
}

.page-header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    max-width: 700px;
    margin: 1rem auto 0;
}

.service-item {
    margin-bottom: 3rem;
    padding: 2rem;
    background-color: var(--bg-white);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.service-item h2 {
    color: var(--primary-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.service-features {
    list-style: none;
    padding: 0;
}

.service-features li {
    padding: 0.5rem 0;
    color: var(--light-text);
    display: flex;
    align-items: center;
}

.service-features li i {
    color: var(--accent-color);
    margin-right: 0.75rem;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 992px) {
    .contact-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background-color: var(--bg-white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-lg);
        padding: 2rem 0;
        gap: 1rem;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    section {
        padding: 60px 0;
    }
    
    .contact-form {
        padding: 2rem 1.5rem;
    }
    
    .page-header h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 576px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.8rem; }
    h3 { font-size: 1.5rem; }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .quick-contact {
        padding: 3rem 0;
    }
    
    .quick-contact h2 {
        font-size: 2rem;
    }
}

/* ===== NUESTRAS SECCIONES (EQUIPO Y TESTIMONIOS) ===== */

/* ----- TEAM SECTION ----- */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.team-member {
    background-color: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    text-align: center;
}

.team-member:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.member-image {
    height: 300px;
    overflow: hidden;
}

.member-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.team-member:hover .member-image img {
    transform: scale(1.05);
}

.member-info {
    padding: 2rem;
}

.member-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.member-title {
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.member-bio {
    color: var(--light-text);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.member-social a {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    background-color: var(--bg-light);
    color: var(--text-color);
    border-radius: 50%;
    transition: var(--transition);
}

.member-social a:hover {
    background-color: var(--accent-color);
    color: var(--bg-white);
    transform: translateY(-3px);
}

/* ----- TESTIMONIALS SECTION ----- */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background-color: var(--bg-white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border-left: 4px solid var(--accent-color);
    display: flex;
    flex-direction: column;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.testimonial-content {
    margin-bottom: 1.5rem;
    flex-grow: 1;
    position: relative;
}

.quote-icon {
    font-size: 2.5rem;
    color: rgba(49, 130, 206, 0.2);
    position: absolute;
    top: -15px;
    left: -10px;
}

.testimonial-content p {
    font-style: italic;
    color: var(--text-color);
    line-height: 1.7;
    margin-left: 20px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.testimonial-author img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border-color);
}

.author-info h4 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--primary-color);
}

.author-info p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--light-text);
}

/* ===== ESTILOS PARA SERVICIOS DETALLADOS (VERSIIÓN EN CUADRÍCULA) ===== */
.services-detailed {
    padding: 60px 0;
}

/* --- Contenedor Principal que ahora es una Cuadrícula --- */
.services-detailed .container {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* <-- ¡LA CLAVE! Dos columnas de igual ancho */
    gap: 2rem; /* Espacio entre las tarjetas */
    align-items: start; /* Alinea las tarjetas en la parte superior */
}

.service-item {
    margin-bottom: 0; /* Ya no necesitamos margin-bottom, el gap de la cuadrícula lo controla */
    background-color: var(--bg-white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    text-align: center;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%; /* Hacemos que todas las tarjetas tengan la misma altura */
}

.service-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--gold-color), var(--primary-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-item:hover::before {
    transform: scaleX(1);
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.service-content {
    max-width: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Permite que el contenido crezca para llenar la tarjeta */
}

.service-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    background-color: rgba(49, 130, 206, 0.1);
    color: var(--accent-color);
    border-radius: 50%;
    margin-bottom: 1rem;
    transition: var(--transition);
}

.service-item:hover .service-icon {
    background-color: var(--gold-color);
    color: var(--bg-white);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.service-icon i {
    font-size: 2rem;
}

.service-content h2 {
    font-size: 1.5rem; /* Título un poco más pequeño para la tarjeta */
    margin-bottom: 1rem;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 10px;
}

.service-content h2::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 2px;
    background-color: var(--accent-color);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    transition: var(--transition);
}

.service-item:hover .service-content h2::after {
    background-color: var(--gold-color);
}

.service-content p {
    color: var(--light-text);
    line-height: 1.6;
    margin-bottom: 1rem;
    text-align: left;
    font-size: 0.9rem;
    flex-grow: 1; /* El párrafo crece para llenar el espacio */
}

.service-features {
    list-style: none;
    padding: 0;
    margin-top: auto; /* Empuja la lista hacia el fondo de la tarjeta */
    text-align: left;
}

.service-features li {
    padding: 0.3rem 0;
    color: var(--text-color);
    display: flex;
    align-items: center;
    font-weight: 500;
    font-size: 0.85rem; /* Fuente más pequeña para la lista */
}

.service-features li i {
    color: var(--accent-color);
    margin-right: 0.75rem;
    font-size: 1rem;
    transition: var(--transition);
}

.service-item:hover .service-features li i {
    color: var(--gold-color);
}

/* --- Responsive para la cuadrícula --- */
@media (max-width: 992px) {
    /* En tablets, pasamos a una sola columna si el espacio es justo */
    .services-detailed .container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .services-detailed {
        padding: 40px 0;
    }
    
    .service-item {
        padding: 1.5rem;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
    }
    
    .service-icon i {
        font-size: 1.8rem;
    }

    .service-content h2 {
        font-size: 1.4rem;
    }
}

/* ===== ESTILOS PARA LOGOS DENTRO DE UN SERVICIO (UNIFORMES) ===== */

.service-logos {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.service-logos h4 {
    text-align: center;
    font-size: 1.1rem;
    color: var(--light-text);
    margin-bottom: 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.logos-inline {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

/* --- ESTILOS CLAVE PARA LOGOS UNIFORMES (SOLUCIÓN DEFINITIVA A PROPORCIONES) --- */
.logos-inline img {
    /* 1. Contenedor y Forma (sin cambios) */
    display: block;
    width: 80px;
    height: 80px;
    border-radius: 50%;

    /* 2. Ajuste de la Imagen (¡LA CLAVE ESTÁ AQUÍ!) */
    object-fit: scale-down; /* <-- ¡CAMBIO IMPORTANTE! Escala la imagen para que quepa completa, pero sin agrandarla si es pequeña */
    object-position: center;

    /* 3. Apariencia y Fondo (más espacio interno) */
    background-color: #f8f9fa;
    border: 1px solid #e2e8f0;
    padding: 15px; /* <-- ¡CAMBIO IMPORTANTE! Más padding para dar más espacio */
    box-sizing: border-box;

    /* 4. Efectos Visuales (sin cambios) */
    filter: grayscale(80%);
    opacity: 0.85;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.logos-inline img:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.08);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-color: var(--accent-color);
}

/* Responsive para logos en línea */
@media (max-width: 768px) {
    .logos-inline {
        gap: 1.5rem;
    }

    .logos-inline img {
        width: 70px;
        height: 70px;
        padding: 12px; /* También ajustamos el padding en móvil */
    }
}

/* ===== ESTILOS PARA EL LOGO CON FONDO OSCURO ===== */


/* Efecto sutil al pasar el mouse */
.logo-container:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.logo-img {
    height: 45px; /* Altura del logo */
    width: auto;
    display: block;
}

/* Ajustes para el logo en pantallas más pequeñas */
@media (max-width: 768px) {
    .logo-container {
        padding: 4px 12px; /* Un poco menos de padding en móvil */
    }
    
    .logo-img {
        height: 38px; /* Logo un poco más pequeño en móvil */
    }
}

/* ===== ESTILOS PARA EL LOGO ===== */

/* Efecto sutil al pasar el mouse */
.logo-container:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.logo-img {
    height: 55px; /* --- AUMENTADO: Hacemos el logo más grande (de 45px a 55px) --- */
    width: 55px; /* --- AÑADIDO: Forzamos el ancho para que sea igual a la altura --- */
    border-radius: 50%; /* --- AÑADIDO: Esto hace que la imagen sea completamente redonda --- */
    object-fit: cover; /* --- AÑADIDO: Asegura que la imagen cubra el espacio sin deformarse --- */
    display: block;
}

/* Ajustes para el logo en pantallas más pequeñas */
@media (max-width: 768px) {
    .logo-container {
        padding: 4px 12px; /* Un poco menos de padding en móvil */
    }
    
    .logo-img {
        height: 45px; /* --- AUMENTADO: Logo más grande en móvil también (de 38px a 45px) --- */
        width: 45px; /* --- AÑADIDO: Mantenemos la proporción cuadrada en móvil --- */
        border-radius: 50%; /* --- AÑADIDO: Nos aseguramos que sea redondo en móvil también --- */
        object-fit: cover; /* --- AÑADIDO: Mantenemos el ajuste de la imagen --- */
    }
}

/* Estilos para la Modal */
.modal {
    display: none; /* Oculta la modal por defecto */
    position: fixed; /* Se queda en su sitio */
    z-index: 1000; /* Se sitúa por encima de todo */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; /* Habilita el scroll si es necesario */
    background-color: rgba(0,0,0,0.6); /* Fondo negro con opacidad */
}

.modal-content {
    background-color: var(--bg-white);
    margin: 5% auto; /* 5% desde arriba y centrado horizontalmente */
    padding: 0;
    border: 1px solid #888;
    width: 80%;
    max-width: 700px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {opacity: 0; transform: translateY(-20px);}
    to {opacity: 1; transform: translateY(0);}
}

.modal-header {
    padding: 20px 30px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5em;
}

.close-btn {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.close-btn:hover,
.close-btn:focus {
    color: #ccc;
    text-decoration: none;
}

.modal-body {
    padding: 30px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-body h3 {
    color: var(--primary-color);
    margin-top: 20px;
}

/* Estilos para el contador animado */
.stat-number {
    transition: all 0.5s ease-out; /* Añade una transición suave */
}