: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 {
    font-size: 1.2rem;
    font-weight: 500;
    color: white;
    font-family: 'Georgia', serif;
}

.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: 3rem 2rem;
    text-align: center;
    background: linear-gradient(rgba(247, 250, 252, 0.7), rgba(247, 250, 252, 0.7)),
                url('extranjeria sabadell.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.hero h1 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 2.5rem;
    position: relative;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.9);
}

.hero p {
    max-width: 800px;
    margin: 0 auto 2rem;
    font-size: 1.1rem;
}

.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.5rem;
    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.3rem;
    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 {
    padding: 2rem;
    margin: 1.5rem auto;
    max-width: 900px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    background-color: var(--light-bg);
}

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

.small-coat {
    display: block;
    margin: 0.5rem auto;
    width: 300px;
}

.reforma-section p {
    text-align: justify;
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.reforma-accordion .accordion-item {
    margin-bottom: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    overflow: hidden;
}

.reforma-accordion .accordion-header {
    background-color: #fff;
    padding: 0.7rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.reforma-accordion .accordion-header h3 {
    margin: 0;
    font-size: 1.3rem;
    color: var(--primary-color);
}

.reforma-accordion .accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 0.7rem;
    background-color: #fff;
}

.reforma-accordion .accordion-content.active {
    max-height: 150px;
    padding: 0.7rem;
}

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

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

.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: 1.5rem;
    margin-bottom: 1rem;
    position: relative;
}

.team-description {
    max-width: 800px;
    margin: 0 auto 2.5rem;
    color: var(--text-color);
    font-size: 1.1rem;
    line-height: 1.6;
}

.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: 1.5rem;
    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.2rem;
    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: 1.5rem;
}

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

.faq-section h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    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;
}

/* Modal styles */
.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;
}

.read-more-button {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 0.9rem;
    margin-top: 5px;
    padding: 0;
    text-decoration: underline;
}

/* Forum Section Styles */
.forum-section {
    padding: 2rem;
    background-color: #f9f9f9;
    margin: 2rem auto;
    max-width: 900px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.forum-section h2 {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 1rem;
}
.forum-section p {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    color: var(--text-color);
}
.forum-form {
    margin-bottom: 2rem;
}
.forum-form h3 {
    margin-bottom: 1rem;
}
.forum-form label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: bold;
}
.forum-form input,
.forum-form textarea {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.forum-form button {
    background-color: var(--primary-color);
    color: white;
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}
.forum-form button:hover {
    background-color: var(--secondary-color);
}
.forum-posts {
    margin-top: 1rem;
}
.forum-post {
    padding: 1rem;
    border-bottom: 1px solid #ddd;
    margin-bottom: 1rem;
}
.forum-post:last-child {
    border-bottom: none;
}
.post-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 0.5rem;
}
.post-header .post-author {
    font-weight: bold;
}
.post-content p {
    margin: 0;
}

.forum-section .profile-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.forum-section .profile-image {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 18px;
    color: white;
    background-size: cover;
    background-position: center;
}

.forum-section .name-date {
    display: flex;
    flex-direction: column;
}

.forum-section .name-date .name {
    margin: 0;
    font-weight: bold;
    color: var(--text-color);
}

.forum-section .name-date .date {
    margin: 0;
    font-size: 0.9rem;
    color: #70757a;
}

/* Association Section */
.association-section {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background-color: #FFFFFF;
    margin: 2rem auto;
    max-width: 1200px;
    gap: 2rem;
}

.association-section .assoc-image {
    flex: 1 1 300px;
    text-align: center;
}

.association-section .assoc-image img {
    max-width: 100%;
    height: auto;
}

.association-section .assoc-content {
    flex: 2 1 400px;
    padding: 1rem;
}

.association-section h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

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

.association-section p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-color);
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
        flex-direction: column;
        gap: 6px;
        cursor: pointer;
    }

    .nav-menu {
        display: none; 
        flex-direction: column;
        position: absolute;
        top: 70px; 
        left: 0;
        right: 0;
        background-color: white;
        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; 
    }

    /* Enlaces en azul oscuro sobre fondo blanco */
    .nav-menu a {
        color: #1a365d; 
    }

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

    .nav-menu li {
        margin: 1rem 0; 
    }
    
    .team-grid {
        gap: 2rem;
    }
    
    h1 {
        font-size: 1.4rem; /* Aproximadamente 28-30px */
    }
    
    h2 {
        font-size: 1.4rem;
    }

    h3 {
        font-size: 1.1rem; /* O el tamaño que consideres mejor */
    }

    .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;
    }
    
    .association-section {
        flex-direction: column;
        text-align: center;
    }
    
    .association-section .assoc-content {
        padding: 1rem 0;
    }
}
