/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

/* Header y navegación */
header {
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5aa0 100%);
    color: white;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo h1 {
    font-size: 1.5rem;
}

.nav-links {
    list-style: none;
    display: flex;
}

.nav-links li {
    margin-left: 20px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #d4af37;
}

.nav-contact {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: auto;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.contact-link:hover {
    color: #d4af37;
}

.contact-link svg {
    flex-shrink: 0;
}

/* Secciones */
section {
    padding: 80px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.hero {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('https://via.placeholder.com/1200x600?text=Justicia') center/cover;
    color: white;
    text-align: center;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px; /* remove section default top padding so content truly centers vertically */
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero-content { max-width: 900px; margin: 0 auto; }

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.btn {
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5aa0 100%);
    color: white;
    padding: 12px 28px;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s;
    font-weight: 500;
    border: 2px solid transparent;
}

.btn:hover {
    background: linear-gradient(135deg, #2c5aa0 0%, #1e3a5f 100%);
    box-shadow: 0 6px 16px rgba(30, 58, 95, 0.3);
    transform: translateY(-2px);
}

/* About */
.about {
    background-color: white;
}

.team {
    display: flex;
    justify-content: space-around;
    margin-top: 30px;
}

.member {
    text-align: center;
    flex: 1;
    margin: 0 10px;
}

/* Services */
.services {
    background-color: #ecf0f1;
}

.service-carousel {
    position: relative;
    height: 350px;
    perspective: 1000px;
    margin-top: 30px;
}

.service-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: white;
    padding: 40px 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: center;
    opacity: 0;
    transform: translateX(100%) rotateY(90deg);
    transition: opacity 0.6s ease-in-out, transform 0.6s ease-in-out;
}

.service-slide.active {
    opacity: 1;
    transform: translateX(0) rotateY(0deg);
}

.service-slide.prev {
    opacity: 0;
    transform: translateX(-100%) rotateY(-90deg);
}

.service-icon {
    color: #d4af37;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e3a5f15 0%, #2c5aa015 100%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
}

.service-slide h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #1e3a5f;
    font-weight: 600;
}

.service-slide p {
    color: #555;
    font-size: 1rem;
    max-width: 400px;
}

/* Contact */
.contact {
    background-color: white;
}

.contact-info {
    display: flex;
    justify-content: space-around;
    margin-bottom: 30px;
}

.info {
    text-align: center;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.contact-form button {
    width: 100%;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5aa0 100%);
    color: white;
    text-align: center;
    padding: 30px 20px;
    margin-top: 40px;
}

footer .contact-links {
    display: none;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

footer .contact-link {
    font-size: 0.9rem;
    white-space: nowrap;
    padding: 8px 12px;
}

/* WhatsApp Floating Action Button */
.whatsapp-fab {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d4af37 0%, #b8941e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(0,0,0,0.2);
    cursor: pointer;
    z-index: 2000;
    transition: transform 0.3s, box-shadow 0.3s;
}

.whatsapp-fab:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 24px rgba(30, 58, 95, 0.3);
}
.whatsapp-fab svg { display: block; }

/* Responsive */
/* Modal styles */
.modal { display: none; position: fixed; inset: 0; z-index: 3000; }
.modal.open { display: block; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.5); }
.modal-content { position: relative; max-width: 680px; margin: 6vh auto; background: white; border-radius: 10px; padding: 20px; box-shadow: 0 20px 50px rgba(0,0,0,0.3); z-index: 3001; }
.modal-close { position: absolute; right: 12px; top: 10px; background: transparent; border: none; font-size: 22px; cursor: pointer; }
.modal-content h2 { margin-top: 0; }
.modal-content input, .modal-content textarea { width: 100%; margin-bottom: 10px; padding: 10px; border: 1px solid #ddd; border-radius: 6px; }
.modal-content textarea { min-height: 100px; resize: vertical; }
.contact-action { text-align: center; margin-top: 20px; }

@media (max-width: 768px) {
    .nav-links {
        display: none; /* Para móvil, podrías agregar un menú hamburguesa */
    }
    
    .nav-contact {
        display: none;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    footer .contact-links {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-top: 15px;
        align-items: center;
    }
    
    footer .contact-link {
        font-size: 0.85rem;
        display: flex;
        align-items: center;
        gap: 8px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    footer .contact-link span {
        word-break: break-word;
    }
    
    .team {
        flex-direction: column;
    }
    
    .contact-info {
        flex-direction: column;
    }
}

/* WhatsApp widget */
.whatsapp-widget {
    position: fixed;
    right: 90px; /* sit above the FAB */
    bottom: 20px;
    width: 340px;
    max-width: calc(100% - 40px);
    background: linear-gradient(180deg, #ffffff 0%, #fbfff9 100%);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    overflow: hidden;
    display: none;
    z-index: 1999;
}
.whatsapp-widget.open { display: block; }
.whatsapp-widget .widget-header {
    background: linear-gradient(90deg, #1e3a5f 0%, #2c5aa0 100%);
    color: white;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.whatsapp-widget .widget-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}
.whatsapp-widget .widget-close {
    background: rgba(255,255,255,0.15);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
}
.whatsapp-widget .widget-body {
    padding: 18px;
}
.widget-bubble {
    background: #ffffff;
    padding: 14px 18px;
    border-radius: 16px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.06);
    color: #222;
}
.whatsapp-widget .widget-footer {
    padding: 12px 16px 18px 16px;
    display: flex;
    justify-content: flex-end;
}
.whatsapp-widget .btn {
    background: linear-gradient(135deg, #d4af37 0%, #b8941e 100%);
    color: white;
    padding: 10px 16px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}
.whatsapp-widget .btn:hover { 
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.whatsapp-widget .widget-footer textarea {
    flex: 1 1 auto;
    margin-right: 10px;
    padding: 10px;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    resize: vertical;
    min-height: 44px;
    font-family: inherit;
}

@media (max-width: 480px) {
    .whatsapp-widget { right: 16px; width: 300px; }
    
    footer {
        padding: 20px 15px;
    }
    
    footer .contact-link {
        font-size: 0.8rem;
        flex-wrap: wrap;
    }
    
    footer .contact-link span {
        display: block;
    }
}