/* Estilos generales */
:root {
    --primary-color: #1a365d; /* Azul oscuro profesional */
    --secondary-color: #2b6cb0; /* Azul corporativo */
    --accent-color: #ffffff; /* Blanco */
    --text-color: #2d3748; /* Gris azulado oscuro para texto */
    --light-gray: #f7fafc; /* Gris muy claro */
    --dark-gray: #4a5568; /* Gris medio */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--light-gray);
    overflow-x: hidden; /* Prevenir desbordamiento horizontal */
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Times New Roman', serif;
    font-weight: 700;
    color: var(--primary-color);
}

a {
    text-decoration: none;
    color: inherit;
}

.btn {
    display: inline-block;
    background-color: var(--secondary-color);
    color: var(--accent-color);
    padding: 12px 30px;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn:hover {
    background-color: #2c5282;
    transform: translateY(-2px);
    color: var(--accent-color);
}

.section-title {
    text-align: center;
    margin-bottom: 40px; /* Reducido para móviles */
    font-size: 2.2rem; /* Tamaño más flexible */
    position: relative;
    color: var(--primary-color);
}

.section-title span {
    color: var(--secondary-color);
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: var(--secondary-color);
    margin: 15px auto;
}

/* Header */
.header {
    background-color: var(--primary-color);
    color: var(--accent-color);
    padding: 15px 0; /* Reducido para móviles */
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(26, 54, 93, 0.1);
    transition: all 0.3s ease;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-img {
    height: 60px; /* Reducido para móviles */
    width: auto;
    transition: all 0.3s ease;
    padding: 0;
    margin: 0;
}

.slogan {
    font-size: 0.7rem;
    letter-spacing: 1px;
    color: var(--accent-color);
    opacity: 0.8;
}

.nav ul {
    display: flex;
    list-style: none;
}

.nav ul li {
    margin-left: 20px; /* Reducido para móviles */
}

.nav ul li a {
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav ul li a:hover {
    color: var(--secondary-color);
}

.nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    bottom: -5px;
    left: 0;
    transition: width 0.3s ease;
}

.nav ul li a:hover::after {
    width: 100%;
}

.mobile-menu {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--accent-color);
}

/* Hero Section */
.hero {
    height: 100vh;
    background: url('https://images.unsplash.com/photo-1589829545856-d10d557cf95f?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80') no-repeat center center/cover;
    position: relative;
    display: flex;
    align-items: center;
    color: var(--accent-color);
    text-align: center;
    margin-top: 70px;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(26, 54, 93, 0.7);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px; /* Añadido para móviles */
}

.hero h2 {
    font-size: 2.5rem; /* Reducido para móviles */
    margin-bottom: 20px;
    line-height: 1.2;
    color: var(--accent-color);
}

.hero p {
    font-size: 1.1rem; /* Reducido para móviles */
    margin-bottom: 30px;
    color: var(--accent-color);
}

/* Services Section */
.services {
    padding: 80px 0; /* Reducido para móviles */
    background-color: var(--accent-color);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Ajusta el tamaño según necesidad */
    gap: 20px;
}

.service-card {
    background: var(--light-gray);
    padding: 30px; /* Reducido para móviles */
    border-radius: 5px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 15px rgba(43, 108, 176, 0.1);
    border: 1px solid rgba(43, 108, 176, 0.1);
}

.service-card p {
    text-align: left;
    font-size: 1rem; /* Asegurar tamaño consistente */
}


.service-card a {
    display: inline-block;
    color: var(--secondary-color);
    font-weight: 600;
    margin: 5px 0; /* Simplificado */
    transition: all 0.3s ease;
    position: relative;
    padding-left: 1.2em;
    text-align: left;
    width: 100%; /* Asegurar alineación */
}

.service-card a::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-size: 0.9em;
    line-height: 1;
}

.service-card a:hover {
    color: var(--primary-color);
    text-decoration: underline;
    transform: translateX(5px);
}


.service-card:hover {
    transform: translateY(-8px); /* Reducido para móviles */
    box-shadow: 0 12px 25px rgba(43, 108, 176, 0.15); /* Ajustado */
}

.service-card .icon {
    width: 70px; /* Reducido para móviles */
    height: 70px; /* Reducido para móviles */
    margin: 0 auto 15px; /* Reducido para móviles */
    background: var(--secondary-color);
    color: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem; /* Reducido para móviles */
}

.service-card h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
    font-size: 1.5rem; /* Tamaño consistente */
}


/* Attorneys Section - CORREGIDO */
.attorneys {
    padding: 80px 0; /* Padding vertical normal */
    background: var(--light-gray);
    font-size: 1rem; /* Tamaño base normal */
}

.attorneys-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Más flexible */
    gap: 25px; /* Reducido para móviles */
}

.attorney-card {
    background: var(--accent-color);
    border-radius: 5px;
    overflow: hidden;
    transition: transform 0.3s ease;
    box-shadow: 0 5px 15px rgba(43, 108, 176, 0.1);
    margin: 0 auto; /* Centrar en dispositivos pequeños */
    max-width: 350px; /* Limitar ancho máximo */
}

.attorney-card:hover {
    transform: translateY(-8px); /* Reducido para móviles */
    box-shadow: 0 12px 25px rgba(43, 108, 176, 0.15); /* Ajustado */
}

.attorney-img {
    height: 300px; /* Reducido para móviles */
    overflow: hidden;
}

.attorney-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.attorney-card:hover .attorney-img img {
    transform: scale(1.05);
}

.attorney-info {
    padding: 20px; /* Reducido para móviles */
    text-align: center;
}

.attorney-info h3 {
    margin-bottom: 5px;
    color: var(--primary-color);
    margin-left: 0; /* Eliminado margen izquierdo */
    font-size: 1.4rem; /* Tamaño consistente */
}

.specialty {
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 1rem; /* Tamaño base */
}

.bio {
    margin-bottom: 15px;
    font-size: 0.95rem; /* Tamaño base */
    color: var(--dark-gray);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 12px; /* Reducido para móviles */
}

.social-links a {
    width: 32px; /* Reducido para móviles */
    height: 32px; /* Reducido para móviles */
    border-radius: 50%;
    background: var(--primary-color);
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--secondary-color);
    color: var(--accent-color);
}

/* Testimonials Section */
.testimonials {
    padding: 80px 0; /* Reducido para móviles */
    background: var(--accent-color);
}

.testimonials-slider {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px; /* Añadido para móviles */
}

.testimonial {
    background: var(--light-gray);
    padding: 30px; /* Reducido para móviles */
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(43, 108, 176, 0.1);
    text-align: center;
    display: none;
}

.testimonial.active {
    display: block;
}

.testimonial p {
    font-size: 1.05rem; /* Tamaño base */
    font-style: italic;
    margin-bottom: 20px;
    position: relative;
    color: var(--text-color);
}

.testimonial p::before,
.testimonial p::after {
    content: '"';
    font-size: 1.8rem; /* Reducido para móviles */
    color: var(--secondary-color);
    opacity: 0.5;
}

.client h4 {
    color: var(--primary-color);
    margin-bottom: 5px;
    font-size: 1.2rem; /* Tamaño consistente */
}

.client p {
    font-size: 0.95rem; /* Tamaño base */
    color: var(--dark-gray);
    font-style: normal;
}

.slider-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 10px; /* Reducido para móviles */
}

.slider-controls button {
    background: var(--secondary-color);
    color: var(--accent-color);
    width: 36px; /* Reducido para móviles */
    height: 36px; /* Reducido para móviles */
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.slider-controls button:hover {
    background: var(--primary-color);
    color: var(--accent-color);
}

/* Contact Section */
.contact {
    padding: 80px 0; /* Reducido para móviles */
    background: var(--light-gray);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px; /* Reducido para móviles */
}

.contact-info h3, .contact-form h3 {
    font-size: 1.6rem; /* Reducido para móviles */
    margin-bottom: 25px; /* Reducido para móviles */
    color: var(--primary-color);
}

.info-item {
    display: flex;
    margin-bottom: 18px; /* Reducido para móviles */
}

.info-item i {
    color: var(--secondary-color);
    font-size: 1.1rem; /* Reducido para móviles */
    margin-right: 12px; /* Reducido para móviles */
    margin-top: 5px;
}

.social-media {
    display: flex;
    gap: 12px; /* Reducido para móviles */
    margin-top: 25px; /* Reducido para móviles */
}

.social-media a {
    width: 38px; /* Reducido para móviles */
    height: 38px; /* Reducido para móviles */
    border-radius: 50%;
    background: var(--primary-color);
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-media a:hover {
    background: var(--secondary-color);
    color: var(--accent-color);
}

.form-group {
    margin-bottom: 18px; /* Reducido para móviles */
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px; /* Reducido para móviles */
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--secondary-color);
    outline: none;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
.footer {
    background: var(--primary-color);
    color: var(--accent-color);
    padding: 60px 0 0; /* Reducido para móviles */
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Más responsivo */
    gap: 1.5rem; /* Reducido para móviles */
}

.footer-col h3 {
    color: var(--secondary-color);
    margin-bottom: 20px; /* Reducido para móviles */
    font-size: 1.2rem; /* Reducido para móviles */
}

.footer-col ul {
    list-style: none;
    padding-left: 0; /* Eliminar padding izquierdo */
}

.footer-col ul li {
    margin-bottom: 8px; /* Reducido para móviles */
}

.footer-col ul li a {
    transition: color 0.3s ease;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem; /* Tamaño base */
}

.footer-col ul li a:hover {
    color: var(--secondary-color);
}

.newsletter-form {
    display: flex;
    margin-top: 15px; /* Reducido para móviles */
}

.newsletter-form input {
    flex: 1;
    padding: 8px 12px; /* Reducido para móviles */
    border: none;
    border-radius: 4px 0 0 4px;
    font-family: inherit;
    font-size: 0.95rem; /* Tamaño base */
}

.newsletter-form button {
    background: var(--secondary-color);
    color: var(--accent-color);
    border: none;
    padding: 0 12px; /* Reducido para móviles */
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background 0.3s ease;
    font-size: 0.95rem; /* Tamaño base */
}

.newsletter-form button:hover {
    background: #2c5282;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px 0; /* Reducido para móviles */
    text-align: center;
    font-size: 0.85rem; /* Reducido para móviles */
    color: rgba(255, 255, 255, 0.7);
}

.legal-links {
    margin-top: 12px; /* Reducido para móviles */
}

.legal-links a {
    margin: 0 8px; /* Reducido para móviles */
    transition: color 0.3s ease;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem; /* Reducido para móviles */
}

.legal-links a:hover {
    color: var(--secondary-color);
}

/* Modal Styles */
.modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(26, 54, 93, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-container.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background-color: var(--accent-color);
    width: 90%;
    max-width: 800px;
    border-radius: 8px;
    box-shadow: 0 5px 30px rgba(43, 108, 176, 0.3);
    transform: translateY(-50px);
    transition: transform 0.3s ease;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-container.active .modal {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5rem; /* Reducido para móviles */
    background: none;
    border: none;
    cursor: pointer;
    color: var(--primary-color);
    transition: color 0.3s ease;
    z-index: 10;
}

.close-modal:hover {
    color: var(--secondary-color);
}

.modal-content {
    padding: 30px; /* Reducido para móviles */
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px; /* Reducido para móviles */
    padding-bottom: 12px; /* Reducido para móviles */
    border-bottom: 2px solid var(--secondary-color);
    position: relative;
}

.modal-icon {
    width: 50px; /* Reducido para móviles */
    height: 50px; /* Reducido para móviles */
    background-color: var(--secondary-color);
    color: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem; /* Reducido para móviles */
    flex-shrink: 0;
    margin-left: 15px; /* Reducido para móviles */
}

.service-description {
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 1rem; /* Tamaño base */
}

.service-features h3 {
    color: var(--primary-color);
    margin-bottom: 12px; /* Reducido para móviles */
    font-size: 1.2rem; /* Reducido para móviles */
}

.service-features ul {
    padding-left: 20px;
    margin-bottom: 20px; /* Reducido para móviles */
}

.service-features li {
    margin-bottom: 8px;
    color: var(--text-color);
    position: relative;
    line-height: 1.5;
    font-size: 1rem; /* Tamaño base */
}

.service-features li::before {
    content: "•";
    color: var(--secondary-color);
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

.service-additional {
    font-style: italic;
    color: var(--dark-gray);
    margin-bottom: 25px; /* Reducido para móviles */
    font-size: 0.95rem; /* Tamaño base */
}

.modal-cta {
    text-align: center;
    margin-top: 25px; /* Reducido para móviles */
}

#contactar-btn {
    background-color: var(--secondary-color);
    color: var(--accent-color);
    border: none;
    padding: 10px 25px; /* Reducido para móviles */
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    width: auto;
    margin: 0 auto;
}

#contactar-btn:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.cta-note {
    font-size: 0.8rem;
    color: var(--dark-gray);
    margin-top: 12px; /* Reducido para móviles */
}

/* Media Queries Responsive */
@media (max-width: 1200px) {
    .section-title {
        font-size: 2.2rem;
    }
    
    .hero h2 {
        font-size: 2.3rem;
    }
    
    .attorneys-grid,
    .services-grid {
        gap: 20px;
    }
}

@media (max-width: 992px) {
    .section-title {
        font-size: 2rem;
        margin-bottom: 50px;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .service-card,
    .attorney-card {
        padding: 25px;
    }
    
    .attorney-img {
        height: 280px;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 12px 0;
    }
    
    .logo-img {
        height: 50px;
    }
    
    .nav {
        position: fixed;
        top: 74px;
        left: -100%;
        width: 80%;
        height: calc(100vh - 74px);
        background: var(--primary-color);
        flex-direction: column;
        padding: 25px;
        transition: left 0.3s ease;
    }
    
    .nav.active {
        left: 0;
    }
    
    .nav ul {
        flex-direction: column;
    }
    
    .nav ul li {
        margin: 12px 0;
    }
    
    .mobile-menu {
        display: block;
    }
    
    .hero {
        height: 85vh;
        margin-top: 74px;
    }
    
    .hero h2 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 40px;
    }
    
    .section-title::after {
        margin: 12px auto;
    }
    
    .services,
    .attorneys,
    .testimonials,
    .contact {
        padding: 60px 0;
    }
    
    .service-card .icon {
        width: 60px;
        height: 60px;
        font-size: 1.4rem;
    }
    
    .service-card h3 {
        font-size: 1.3rem;
    }
    
    .attorney-info h3 {
        font-size: 1.3rem;
    }
    
    .testimonial {
        padding: 25px;
    }
    
    .contact-grid {
        gap: 30px;
    }
    
    .footer-grid {
        gap: 1.2rem;
    }
    
    .modal-content {
        padding: 25px;
    }
}

@media (max-width: 576px) {
    .section-title {
        font-size: 1.7rem;
        margin-bottom: 35px;
    }
    
    .hero {
        height: 75vh;
    }
    
    .hero h2 {
        font-size: 1.6rem;
    }
    
    .hero p {
        font-size: 0.95rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.95rem;
    }
    
    .services-grid,
    .attorneys-grid {
        grid-template-columns: 1fr;
    }
    
    .service-card,
    .attorney-card {
        max-width: 100%;
    }
    
    .testimonials-slider {
        padding: 0 15px;
    }
    
    .slider-controls {
        padding: 0 5px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-col {
        text-align: center;
    }
    
    .social-media,
    .social-links {
        justify-content: center;
    }
    
    .newsletter-form {
        max-width: 300px;
        margin: 15px auto 0;
    }
    
    .modal {
        width: 95%;
    }
    
    .modal-header {
        flex-direction: column;
        text-align: center;
    }
    
    .modal-icon {
        margin: 15px 0 0 0;
    }
    
    .service-features ul {
        columns: 1;
    }
}

/* Ajustes adicionales para tablets */
@media (min-width: 577px) and (max-width: 991px) {
    .attorneys-grid,
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero h2 {
        font-size: 2.2rem;
    }
    
    .service-card h3 {
        font-size: 1.4rem;
    }
    
    .attorney-info h3 {
        font-size: 1.4rem;
    }
}