/* CSS - Mario Velardo Law Firm */

:root {
    --primary-color: #0f172a; /* Navy blue */
    --primary-light: #1e293b;
    --accent-color: #d4af37; /* Gold */
    --accent-hover: #b8962e;
    --text-main: #334155;
    --text-light: #64748b;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    line-height: 1.6;
    background-color: var(--bg-white);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Typography elements */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    line-height: 1.2;
}

.about-text p, .modal-content p, .service-card p, .faq-answer p {
    text-align: justify;
    hyphens: auto;
}

.section {
    padding: 100px 0;
}

.text-center { text-align: center; }
.bg-light { background-color: var(--bg-light); }
.text-white { color: var(--bg-white); }
.text-light { color: #cbd5e1; }
.w-100 { width: 100%; }

/* Buttons */
.btn-primary {
    display: inline-block;
    background-color: var(--accent-color);
    color: #fff;
    padding: 14px 28px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300%;
    height: 300%;
    background: rgba(255,255,255,0.1);
    transform: translate(-50%, -50%) rotate(35deg) translateY(100%);
    transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    z-index: 1;
}

.btn-primary:hover::after {
    transform: translate(-50%, -50%) rotate(35deg) translateY(-100%);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

/* Identifiers / Badges */
.section-badge {
    display: inline-block;
    color: var(--accent-color);
    text-transform: uppercase;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 2px;
    margin-bottom: 12px;
    position: relative;
}
.section-badge::after {
    content: '';
    display: block;
    width: 30px;
    height: 2px;
    background-color: var(--accent-color);
    margin-top: 4px;
    transition: width 0.3s ease;
}
.section-badge:hover::after {
    width: 100%;
}
.section-badge.light {
    color: var(--accent-color);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.section-subtitle {
    color: var(--text-light);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 40px;
}

.divider {
    height: 3px;
    width: 60px;
    background-color: var(--accent-color);
    margin-bottom: 30px;
    transition: width 0.4s ease;
}
.section:hover .divider {
    width: 80px;
}
.divider.center { margin: 0 auto 30px; }
.divider.light { background-color: var(--accent-color); }

/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 1px 10px rgba(0,0,0,0.05);
    transition: padding 0.4s ease, background-color 0.4s ease, box-shadow 0.4s ease;
    padding: 15px 0;
}

.navbar.scrolled {
    padding: 12px 0;
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: block;
    text-decoration: none;
    transition: transform 0.3s ease;
}
.logo img {
    height: 95px;
    width: auto;
    border-radius: 4px;
    display: block;
}
.logo:hover {
    transform: scale(1.05);
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    transition: var(--transition);
}

.nav-links a:not(.btn-primary)::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-links a:hover:not(.btn-primary)::after, 
.nav-links a:focus:not(.btn-primary)::after {
    width: 100%;
}

.nav-links a:hover, .nav-links a:focus {
    color: var(--accent-color);
}

.mobile-menu {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    background-color: var(--primary-color);
    background-image: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    position: relative;
    display: flex;
    align-items: center;
    padding-top: 80px;
    overflow: hidden;
}

/* Animacion sutil de particulas de fondo usando seudoementos */
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(212,175,55,0.03) 10%, transparent 40%);
    animation: rotateBg 40s linear infinite;
    z-index: 1;
}

@keyframes rotateBg {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    text-align: center;
    margin: 0 auto;
}

.hero-content .subtitle {
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.9rem;
    font-weight: 600;
    display: block;
    margin-bottom: 20px;
}

.hero-content h1 {
    color: #fff;
    font-size: 4.5rem;
    margin-bottom: 24px;
    font-weight: 700;
    text-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.hero-content p {
    color: #cbd5e1;
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto 40px;
    font-weight: 300;
}

/* --- About Section --- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: var(--text-main);
}

.about-image {
    width: 100%;
    aspect-ratio: 4/5;
    border-radius: 8px;
    position: relative;
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    border: 2px solid var(--accent-color);
    padding: 12px;
    background-color: var(--bg-white);
}

.about-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

.about-image:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    border-color: var(--primary-color);
}

.scales-icon {
    font-size: 5rem;
    opacity: 0.2;
    transition: opacity 0.3s ease, transform 0.5s ease;
}

.about-image-placeholder:hover .scales-icon {
    opacity: 0.4;
    transform: scale(1.1);
}

/* --- Services Section --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.service-card {
    background: var(--bg-white);
    padding: 40px 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.03);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 30px rgba(0,0,0,0.08);
    border-color: var(--accent-color);
}

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background-color: var(--accent-color);
    transition: width 0.4s ease;
}

.service-card:hover::after {
    width: 100%;
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--primary-color);
    transition: transform 0.4s ease;
}

.service-card:hover .service-icon {
    transform: translateY(-5px) scale(1.1);
}

.service-card h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
}

.service-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

.highlighted-service {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}
.highlighted-service h3 { color: #fff; }
.highlighted-service p { color: #cbd5e1; }
.highlighted-service .service-icon { filter: grayscale(1) brightness(2); }

/* Other Services List */
.other-services {
    background: var(--bg-white);
    padding: 40px;
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.other-services:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.other-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.other-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    list-style: none;
}

.other-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--text-main);
    transition: transform 0.2s ease, color 0.2s ease;
}

.other-list li:hover {
    transform: translateX(5px);
    color: var(--primary-color);
}

.other-list li span {
    color: var(--accent-color);
    font-weight: bold;
}

/* --- Contact Section --- */
.contact-section {
    background-color: var(--primary-light);
    color: var(--bg-white);
    position: relative;
    overflow: hidden;
}

/* Patron de fondo sutil para seccion contacto */
.contact-section::before {
    content: '';
    position: absolute;
    right: -10%;
    top: -10%;
    width: 50%;
    padding-bottom: 50%;
    background: radial-gradient(circle, rgba(212,175,55,0.05) 0%, transparent 60%);
    border-radius: 50%;
    pointer-events: none;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    position: relative;
    z-index: 2;
}

.info-items {
    margin-top: 40px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 30px;
    transition: transform 0.3s ease;
}

.info-item:hover {
    transform: translateX(10px);
}

.info-icon {
    font-size: 1.5rem;
    background: rgba(255,255,255,0.05);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--accent-color);
    transition: background 0.3s ease, transform 0.3s ease;
}

.info-item:hover .info-icon {
    background: rgba(212,175,55,0.1);
    transform: scale(1.1);
}

.info-item h4 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 5px;
    font-family: var(--font-body);
}

.info-item p {
    color: #cbd5e1;
}

.contact-form-container {
    background: var(--bg-white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.form-title {
    margin-bottom: 24px;
    color: var(--primary-color);
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group input, 
.form-group select, 
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-main);
    transition: all 0.3s ease;
    background-color: var(--bg-light);
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(212,175,55,0.1);
}

.form-feedback {
    margin-top: 20px;
    padding: 15px;
    border-radius: 4px;
    background-color: #f0fdf4;
    color: #166534;
    border: 1px solid #bbfcce;
    font-size: 0.95rem;
    display: none;
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.form-feedback.visible {
    display: block;
}

/* FAQ Styles */
.faq-grid {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
    transition: var(--transition);
}

.faq-question {
    padding: 20px 24px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--primary-color);
    font-family: var(--font-body);
}

.faq-toggle {
    color: var(--accent-color);
    font-size: 1.5rem;
}

.faq-answer {
    padding: 0 24px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0, 1, 0, 1);
    color: var(--text-light);
    border-top: 0 solid var(--border-color);
}

.faq-item.active {
    border-color: var(--accent-color);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 20px 24px;
    border-top-width: 1px;
    transition: all 0.4s cubic-bezier(1, 0, 1, 0);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Scroll Animations Classes --- */
.animate-on-scroll {
    opacity: 0;
    transition-duration: 0.8s;
    transition-timing-function: cubic-bezier(0.165, 0.84, 0.44, 1);
    transition-property: opacity, transform;
}

/* Fade In Up */
.fade-in-up {
    transform: translateY(40px);
}
.fade-in-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Fade In Left */
.fade-in-left {
    transform: translateX(-40px);
}
.fade-in-left.is-visible {
    opacity: 1;
    transform: translateX(0);
}

/* Fade In Right */
.fade-in-right {
    transform: translateX(40px);
}
.fade-in-right.is-visible {
    opacity: 1;
    transform: translateX(0);
}

/* Scale In */
.scale-in {
    transform: scale(0.95);
}
.scale-in.is-visible {
    opacity: 1;
    transform: scale(1);
}

/* Delays */
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }


/* --- Footer --- */
.footer {
    background-color: var(--primary-color);
    padding: 40px 0;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.logo-footer {
    color: #fff;
    font-size: 1.8rem;
    margin-bottom: 10px;
}
.logo-footer span { color: var(--accent-color); }
.footer p { color: #64748b; font-size: 0.9rem; }

/* --- Responsive --- */
@media (max-width: 992px) {
    .about-grid, .contact-grid {
        grid-template-columns: 1fr;
    }
    .hero-content h2 { font-size: 3.5rem; }
    .about-image-placeholder { max-width: 500px; margin: 40px auto 0; }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #fff;
        padding: 20px;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
    }
    .nav-links.active { display: flex; }
    .mobile-menu { display: block; }
    .hero-content h2 { font-size: 2.8rem; }
    .section { padding: 60px 0; }
}

/* --- Modals CSS --- */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.modal.visible {
    opacity: 1;
}

.modal-content {
    background-color: var(--bg-white);
    margin: auto;
    padding: 40px;
    border-radius: 8px;
    width: 100%;
    max-width: 700px;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.modal.visible .modal-content {
    transform: scale(1);
}

.close-modal {
    color: #94a3b8;
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    line-height: 1;
}

.close-modal:hover {
    color: var(--primary-color);
}
