:root {
    --primary-color: #1a365d;
    --secondary-color: #2a4365;
    --text-color: #2d3748;
    --light-bg: #e6f3ff;  
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
}

.navbar {
    background-color: var(--primary-color);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 60px;
    width: auto;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
}

.nav-menu {
    display: flex; 
    flex-direction: row; 
    list-style: none;
    gap: 2rem;
    position: static; 
}

.nav-menu a {
    text-decoration: none;
    color: white;
    font-weight: 500;
}

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

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: white;
    transition: all 0.3s ease;
}

.hero {
    padding: 4rem 2rem;
    text-align: center;
    background: linear-gradient(rgba(26, 54, 93, 0.5), rgba(26, 54, 93, 0.5)),
                url('abogado-reclamar-indemnizaciones-zaragoza.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    color: white;
    min-height: 400px; /* ✅ Altura reservada para evitar CLS */
}

.hero h1 {
    font-size: 1.7rem;
    color: white;
    margin-bottom: 2.5rem;
    position: relative;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.hero p {
    max-width: 800px;
    margin: 0 auto 2rem;
    font-size: 1.1rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.hero .cta-button {
    padding: 1rem 2rem;
    background-color: #25D366;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.hero .cta-button:hover {
    background-color: #128C7E;
}

.cta-button {
    padding: 1rem 2rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.cta-button:hover {
    background-color: var(--secondary-color);
}

.features, .feature {
    display: none;
}

.info-section {
    padding: 1.5rem;
    background-color: var(--light-bg);
    margin: 1.5rem auto;
    max-width: 800px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.info-section h2 {
    color: var(--primary-color);
    font-size: 1.75rem;
    margin-bottom: 1rem;
    text-align: center;
    position: relative;
    padding-bottom: 0.5rem;
}

.info-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background-color: var(--primary-color);
}

.info-section .coat-of-arms {
    display: block;
    width: 120px;
    height: auto;
    margin: 1rem auto;
    opacity: 0.8;
}

.info-section p {
    max-width: 1000px;
    margin: 0 auto 1.5rem;
    text-align: justify;
    line-height: 1.8;
    color: #4a5568;
}

.accordion {
    max-width: 100%;
    margin: 0.75rem auto;
    background: white;
    padding: 1rem;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.accordion-title {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-align: center;
    position: relative;
    padding-bottom: 0.5rem;
}

.accordion-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background-color: var(--primary-color);
}

.accordion-item {
    margin-bottom: 0.4rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
}

.accordion-header {
    background-color: white;
    padding: 0.8rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.accordion-header:hover {
    background-color: #f8fafc;
}

.accordion-header h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 600;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 0.8rem;
    background-color: white;
}

.accordion-content.active {
    max-height: 250px;
    padding: 0.8rem;
}

.accordion-icon {
    transition: transform 0.3s ease;
    color: var(--primary-color);
}

.accordion-header.active .accordion-icon {
    transform: rotate(180deg);
}

.reforma-section {
    display: none;
}

.reforma-section h2,
.reforma-section .small-coat,
.reforma-section p,
.reforma-accordion .accordion-item,
.reforma-accordion .accordion-header,
.reforma-accordion .accordion-header h3,
.reforma-accordion .accordion-content,
.reforma-accordion .accordion-content.active,
.reforma-accordion .accordion-icon,
.reforma-accordion .accordion-header.active .accordion-icon {
    display: none;
}

.reviews-section {
    margin-top: 4rem;
}

.team-section {
    padding: 3rem 2rem;
    text-align: center;
    background-color: white;
    margin: 1.5rem auto;
    max-width: 1200px;
}

.team-section h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 2rem;
    position: relative;
}

.team-section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 1rem;
}

.team-member {
    text-align: center;
}

.team-member img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 10%;
    margin-bottom: 1.5rem;
    border: 3px solid var(--primary-color);
    transition: transform 0.3s ease;
}

.team-member img:hover {
    transform: scale(1.05);
}

.team-member h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.team-member p {
    color: var(--text-color);
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 300px;
    margin: 0 auto;
}

.contact-banner {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 2.5rem 2rem;
    text-align: center;
    color: white;
    margin: 3rem 0 0 0;
}

.contact-banner h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.contact-banner p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.contact-buttons {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.contact-button {
    display: inline-flex;
    align-items: center;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.contact-button i {
    margin-right: 10px;
    font-size: 1.2rem;
}

.call-button {
    background-color: white;
    color: var(--primary-color);
}

.whatsapp-button {
    background-color: #25D366;
    color: white;
}

.tramites-section {
    padding: 3rem 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.tramites-section h3 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.tramites-section > p {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-color);
    font-size: 1.1rem;
}

.tramites-accordion .accordion-item {
    margin-bottom: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.tramites-accordion .accordion-header {
    padding: 1rem;
    background-color: white;
    cursor: pointer;
}

.tramites-accordion .accordion-header h4 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin: 0;
}

.tramites-accordion .accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: #f8fafc;
}

.tramites-accordion .accordion-content.active {
    max-height: 500px;
    padding: 1rem;
}

.tramites-accordion .accordion-content ul {
    list-style-type: none;
    padding: 0;
}

.tramites-accordion .accordion-content li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
}

.tramites-accordion .accordion-content li:before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

.tramites-accordion .accordion-content p {
    margin-bottom: 1rem;
}

.faq-section {
    padding: 3rem 2rem;
    background-color: var(--light-bg);
    margin-top: 0rem;
}

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

.faq-section h2 {
    color: var(--primary-color);
    font-size: 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
    position: relative;
}

.faq-section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
}

.faq-item {
    margin-bottom: 0.75rem;
    border-radius: 8px;
    overflow: hidden;
}

.faq-question {
    background-color: var(--light-bg);
    padding: 1rem;
    cursor: pointer;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.faq-question h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin: 0;
    padding-right: 2.5rem;
    position: relative;
}

.faq-question h3::after {
    content: '+';
    position: absolute;
    right: -1.5rem;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
    font-size: 24px;
    color: var(--primary-color);
    font-weight: bold;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
}

.faq-question.active h3::after {
    transform: translateY(-50%) rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: white;
    padding: 0 1rem;
}

.faq-answer.active {
    max-height: 500px;
    padding: 1rem;
    border: 1px solid #d1d5db;
    border-top: none;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.footer {
    background-color: var(--primary-color);
    padding: 3rem 2rem;
    color: white;
    margin-top: 3rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section {
    padding: 1rem;
}

.footer-section h3 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: white;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.footer-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

.footer-contact {
    list-style: none;
    padding: 0;
}

.footer-contact li {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-contact i {
    width: 20px;
}

.map-container {
    width: 100%;
    height: 300px;
    overflow: hidden;
    border-radius: 8px;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.floating-buttons {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}

.floating-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}

.floating-button:hover {
    transform: scale(1.1);
}

.floating-button.call {
    background-color: var(--primary-color);
}

.floating-button.whatsapp {
    background-color: #25D366;
}

.floating-button i {
    font-size: 24px;
}

.services-section {
    padding: 2rem;
    background: var(--light-bg);
    margin: 0rem 0;
}

.service-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 1rem;
}

.service-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.service-item:hover {
    transform: translateY(-5px);
}

.service-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 3px solid var(--primary-color);
}

.service-item h2 {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.service-item p {
    padding: 1rem;
    color: var(--text-color);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.service-cta {
    display: inline-block;
    margin: 0 1rem 1rem;
    padding: 0.8rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    transition: background-color 0.3s ease;
}

.service-cta:hover {
    background-color: var(--secondary-color);
}

.service-cta i {
    margin-right: 0.5rem;
}

.law-firm-section {
    background: white;
    padding: 3rem 2rem;
    margin: 1.5rem auto;
    max-width: 1200px;
}

.law-firm-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.law-firm-image img {
    width: 300px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.law-firm-content {
    text-align: center;
    max-width: 800px;
}

.law-firm-content h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.law-firm-content h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.law-firm-content p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.law-firm-content ul {
    list-style: none;
    padding: 0;
    margin-bottom: 1.5rem;
    text-align: left;
}

.law-firm-content li {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
        flex-direction: column;
        gap: 6px;
        cursor: pointer;
    }
    
        .info-section {
        max-width: 100%; /* ocupa todo el ancho */
        margin: 0;       /* quita márgenes laterales */
        padding: 1rem;   /* ajusta el padding para que no quede pegado a los bordes */
    }

    .nav-menu {
        display: none; 
        flex-direction: column;
        position: absolute;
        top: 70px; 
        left: 0;
        right: 0;
        background-color: #1a365d;
        padding: 1rem 0;
        text-align: center;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        transition: all 0.3s ease;
        z-index: 1000; 
    }
    
        h2 {
        font-size: 1.2rem; /* Tamaño de fuente más pequeño */
        margin-bottom: 1rem; /* Menos espacio abajo */
        line-height: 1.3; /* Más compacto verticalmente */
    }

    .nav-menu.active {
        display: flex; 
    }

    .nav-menu li {
        margin: 1rem 0; 
    }
    
    .team-grid {
        gap: 2rem;
    }
    
    .team-member img {
        width: 150px;
        height: 150px;
    }
    
    .contact-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .contact-button {
        width: 100%;
        justify-content: center;
    }

    .footer-container {
        grid-template-columns: 1fr;
    }
    
    .map-container {
        height: 250px;
    }
    
    .service-container {
        grid-template-columns: 1fr;
    }
    
    .service-item {
        margin: 1rem;
    }
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow-y: auto;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    width: 90%;
    max-width: 800px;
    position: relative;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modal-close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #000;
}

.modal h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.modal p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.modal-section {
    margin-bottom: 2rem;
}

.modal-section:last-child {
    margin-bottom: 0;
}