/* ============================================
   Profesionales Law - Shared Styles
   ============================================ */

/* Custom Properties */
:root {
    --color-primary: #791038;
    --color-primary-dark: #5a0c2a;
    --color-primary-light: #9a1448;
    --color-secondary: #141414;
    --color-neutral: #828387;
    --color-white: #FFFFFF;
    --color-gray-50: #f9fafb;
    --color-gray-100: #f3f4f6;
    --color-gray-200: #e5e7eb;
    --color-gray-300: #d1d5db;
    --color-gray-800: #1f2937;
    --color-gray-900: #111827;
    
    --font-primary: 'Inter', system-ui, -apple-system, sans-serif;
    --transition-base: all 0.3s ease;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    color: var(--color-secondary);
    background-color: var(--color-white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-secondary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

@media (min-width: 768px) {
    h1 { font-size: 3.5rem; }
    h2 { font-size: 2.5rem; }
    h3 { font-size: 1.75rem; }
}

p {
    color: var(--color-neutral);
    margin-bottom: 1rem;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition-base);
}

a:hover {
    color: var(--color-primary-dark);
}

/* Utility Classes */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .container {
        padding: 0 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 2rem;
    }
}

.section-padding {
    padding: 4rem 0;
}

@media (min-width: 768px) {
    .section-padding {
        padding: 6rem 0;
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: var(--transition-base);
    cursor: pointer;
    border: none;
    text-decoration: none;
}

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

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
}

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

.btn-white:hover {
    background-color: var(--color-gray-100);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline-white {
    background-color: transparent;
    color: var(--color-white);
    border: 2px solid var(--color-white);
}

.btn-outline-white:hover {
    background-color: var(--color-white);
    color: var(--color-primary);
}

/* Header & Navigation */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: var(--color-white);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
}

.header.scrolled {
    box-shadow: var(--shadow-md);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    max-width: 1280px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

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

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
}

.nav-menu {
    display: none;
    list-style: none;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .nav-menu {
        display: flex;
    }
}

.nav-menu a {
    color: var(--color-secondary);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-primary);
    transition: var(--transition-base);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--color-primary);
}

/* Mobile Menu */
.mobile-menu-btn {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

@media (min-width: 1024px) {
    .mobile-menu-btn {
        display: none;
    }
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--color-secondary);
    transition: var(--transition-base);
    border-radius: 2px;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.mobile-nav {
    display: none;
    position: fixed;
    top: 82px;
    left: 0;
    right: 0;
    background-color: var(--color-white);
    box-shadow: var(--shadow-lg);
    padding: 1rem;
    z-index: 999;
}

.mobile-nav.active {
    display: block;
}

.mobile-nav ul {
    list-style: none;
}

.mobile-nav a {
    display: block;
    padding: 1rem;
    color: var(--color-secondary);
    font-weight: 500;
    border-bottom: 1px solid var(--color-gray-200);
}

.mobile-nav a:hover,
.mobile-nav a.active {
    color: var(--color-primary);
    background-color: var(--color-gray-50);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(121, 16, 56, 0.9) 0%, rgba(20, 20, 20, 0.85) 100%);
}

.hero-content {
    position: relative;
    z-index: 10;
    color: var(--color-white);
    max-width: 800px;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--color-white);
    line-height: 1.1;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 3.5rem;
    }
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: 4rem;
    }
}

.hero-subtitle {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    line-height: 1.7;
    color: var(--color-white);
}

@media (min-width: 768px) {
    .hero-subtitle {
        font-size: 1.25rem;
    }
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Cards */
.card {
    background-color: var(--color-white);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition-base);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.card-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(121, 16, 56, 0.1);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.card-icon svg {
    width: 30px;
    height: 30px;
    color: var(--color-primary);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--color-secondary);
}

.card-text {
    color: var(--color-neutral);
    line-height: 1.7;
}

/* Section Headers */
.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem;
}

.section-label {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--color-secondary);
}

@media (min-width: 768px) {
    .section-title {
        font-size: 2.5rem;
    }
}

.section-description {
    font-size: 1.125rem;
    color: var(--color-neutral);
    line-height: 1.7;
}

/* Footer */
.footer {
    background-color: var(--color-secondary);
    color: var(--color-white);
    padding: 4rem 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (min-width: 640px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }
}

.footer-brand p {
    color: var(--color-gray-300);
    margin-top: 1rem;
    line-height: 1.7;
}

.footer-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--color-white);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--color-gray-300);
    transition: var(--transition-base);
}

.footer-links a:hover {
    color: var(--color-white);
    padding-left: 5px;
}

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: var(--color-gray-300);
}

.footer-contact-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--color-primary);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
}

.social-link:hover {
    background-color: var(--color-primary);
    transform: translateY(-3px);
}

.social-link svg {
    width: 20px;
    height: 20px;
    color: var(--color-white);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 0;
    text-align: center;
}

.footer-bottom p {
    color: var(--color-gray-300);
    font-size: 0.875rem;
    margin: 0;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--color-secondary);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--color-gray-200);
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition-base);
    background-color: var(--color-white);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(121, 16, 56, 0.1);
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.form-checkbox input {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: var(--color-primary);
}

.form-error {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Testimonials */
.testimonial-card {
    background-color: var(--color-white);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    position: relative;
}

.testimonial-quote {
    font-size: 3rem;
    color: var(--color-primary);
    opacity: 0.2;
    position: absolute;
    top: 1rem;
    left: 1.5rem;
    font-family: Georgia, serif;
}

.testimonial-text {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--color-neutral);
    margin-bottom: 1.5rem;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.testimonial-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    font-weight: 700;
    font-size: 1.25rem;
}

.testimonial-info h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-secondary);
    margin-bottom: 0.25rem;
}

.testimonial-info p {
    font-size: 0.875rem;
    color: var(--color-neutral);
    margin: 0;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
    .stat-number {
        font-size: 3.5rem;
    }
}

.stat-label {
    font-size: 1rem;
    color: white;
    font-weight: 500;
}

/* Team Cards */
.team-card {
    background-color: var(--color-white);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition-base);
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.team-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.team-info {
    padding: 1.5rem;
}

.team-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-secondary);
    margin-bottom: 0.25rem;
}

.team-position {
    font-size: 0.875rem;
    color: var(--color-primary);
    font-weight: 600;
    margin-bottom: 1rem;
}

.team-bio {
    font-size: 0.9375rem;
    color: var(--color-neutral);
    line-height: 1.7;
}

/* Page Header */
.page-header {
    padding-top: 120px;
    padding-bottom: 4rem;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    text-align: center;
}

.page-header h1 {
    color: var(--color-white);
    margin-bottom: 1rem;
}

.page-header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.7);
}

.breadcrumb a:hover {
    color: var(--color-white);
}

.breadcrumb span {
    color: rgba(255, 255, 255, 0.5);
}

.breadcrumb-current {
    color: var(--color-white);
}

/* Service Detail */
.service-detail {
    padding: 2rem;
    background-color: var(--color-gray-50);
    border-radius: 1rem;
    margin-bottom: 2rem;
}

.service-detail h3 {
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.service-list {
    list-style: none;
    margin-top: 1rem;
}

.service-list li {
    padding: 0.75rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--color-neutral);
    border-bottom: 1px solid var(--color-gray-200);
}

.service-list li:last-child {
    border-bottom: none;
}

.service-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 1.1rem;
    width: 8px;
    height: 8px;
    background-color: var(--color-primary);
    border-radius: 50%;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    padding: 4rem 0;
    text-align: center;
}

.cta-section h2 {
    color: var(--color-white);
    margin-bottom: 1rem;
}

.cta-section p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

.animate-delay-100 { animation-delay: 0.1s; }
.animate-delay-200 { animation-delay: 0.2s; }
.animate-delay-300 { animation-delay: 0.3s; }
.animate-delay-400 { animation-delay: 0.4s; }

/* Lazy Loading */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    z-index: 9999;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 1rem;
}

/* Value Cards */
.value-card {
    background-color: var(--color-white);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border-left: 4px solid var(--color-primary);
    transition: var(--transition-base);
}

.value-card:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-lg);
}

.value-card h4 {
    color: var(--color-primary);
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.value-card p {
    color: var(--color-neutral);
    line-height: 1.7;
    margin: 0;
}

/* Map Container */
.map-container {
    width: 100%;
    height: 400px;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

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

/* Contact Info Card */
.contact-info-card {
    background-color: var(--color-gray-50);
    border-radius: 1rem;
    padding: 2rem;
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-info-item:last-child {
    margin-bottom: 0;
}

.contact-info-icon {
    width: 50px;
    height: 50px;
    background-color: var(--color-primary);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-info-icon svg {
    width: 24px;
    height: 24px;
    color: var(--color-white);
}

.contact-info-content h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-secondary);
    margin-bottom: 0.25rem;
}

.contact-info-content p {
    color: var(--color-neutral);
    margin: 0;
}

/* Responsive Images */
.img-responsive {
    width: 100%;
    height: auto;
    display: block;
}

/* Grid Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 640px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

.grid-4 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 640px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}
