/**
 * DMP Abogados - Estilos Principales
 * Sistema de diseño profesional y responsive
 */

/* ========== Variables CSS ========== */
:root {
    --color-primary: #1e3c72;
    --color-secondary: #2a5298;
    --color-accent: #ffd700;
    --color-dark: #1a1a2e;
    --color-text: #333333;
    --color-text-light: #666666;
    --color-bg: #ffffff;
    --color-bg-light: #f8f9fa;
    --color-border: #e0e0e0;
    --color-success: #28a745;
    --color-whatsapp: #25d366;
    
    --font-primary: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.2);
    
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    --border-radius-sm: 6px;
    --border-radius-md: 10px;
    --border-radius-lg: 16px;
    --border-radius-full: 50px;
}

/* ========== Reset y Base ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-base);
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* ========== Utilidades ========== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* ========== Header y Navegación ========== */
.main-header {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    box-shadow: var(--shadow-md);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition-base);
    min-height: 73px;
}

.main-header.scrolled {
    box-shadow: var(--shadow-lg);
}

.navbar {
    padding: 1rem 0;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    letter-spacing: 0.5px;
    transition: var(--transition-base);
}

.logo:hover {
    transform: scale(1.05);
}

.logo-icon {
    font-size: 2rem;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.nav-link {
    color: white;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 0;
    position: relative;
    transition: var(--transition-base);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-accent);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: white;
    border-radius: 3px;
    transition: var(--transition-base);
}

.nav-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Submenú de navegación */
.nav-item.has-submenu {
    position: relative;
}

.submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 380px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition-base);
    margin-top: 0.75rem;
    overflow: hidden;
    z-index: 1000;
}

.nav-item.has-submenu:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.submenu-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    color: var(--color-text);
    border-bottom: 1px solid var(--color-border);
    transition: var(--transition-base);
}

.submenu-item:last-child {
    border-bottom: none;
}

.submenu-item:hover {
    background: var(--color-bg-light);
    padding-left: 1.5rem;
}

.submenu-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.submenu-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.submenu-title {
    font-weight: 600;
    color: var(--color-primary);
    font-size: 0.95rem;
}

.submenu-price {
    font-size: 0.8rem;
    color: var(--color-text-light);
}

.submenu-trigger {
    display: flex;
    align-items: center;
}

/* ========== Botones ========== */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: var(--border-radius-full);
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    transition: var(--transition-base);
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--color-accent);
    color: var(--color-primary);
}

.btn-primary:hover {
    background: #ffed4e;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

.btn-secondary {
    background: transparent;
    border-color: white;
    color: white;
}

.btn-secondary:hover {
    background: white;
    color: var(--color-primary);
}

.btn-outline {
    background: transparent;
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.btn-outline:hover {
    background: var(--color-primary);
    color: white;
}

.btn-sm {
    padding: 0.625rem 1.5rem;
    font-size: 0.9rem;
}

.btn-lg {
    padding: 1.125rem 2.5rem;
    font-size: 1.125rem;
}

/* ========== Hero Section ========== */
.hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: white;
    padding: 180px 2rem 120px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h100v100H0z" fill="none"/><path d="M50 0L100 50L50 100L0 50z" fill="rgba(255,255,255,0.03)"/></svg>');
    background-size: 100px 100px;
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    animation: fadeInUp 0.8s ease;
}

.hero p {
    font-size: 1.375rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
    line-height: 1.7;
    animation: fadeInUp 1s ease;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1.2s ease;
}

/* ========== Secciones ========== */
.section {
    padding: 100px 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--color-accent);
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--color-text-light);
    max-width: 700px;
    margin: 1.5rem auto 0;
    line-height: 1.7;
}

.section-alt {
    background: var(--color-bg-light);
}

/* ========== Grid de Servicios ========== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background: white;
    padding: 2.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition-base);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    display: block;
}

.service-card h3 {
    font-size: 1.5rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.service-card p {
    color: var(--color-text-light);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}


/* ========== Página de Servicio Individual ========== */
.service-detail {
    padding: 150px 2rem 100px;
}

.service-header {
    text-align: center;
    max-width: 900px;
    margin: 0 auto 4rem;
}

.service-header-icon {
    font-size: 5rem;
    margin-bottom: 1.5rem;
}

.service-header h1 {
    font-size: 3rem;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
}

.service-header p {
    font-size: 1.25rem;
    color: var(--color-text-light);
    line-height: 1.8;
}

.service-content {
    max-width: 1000px;
    margin: 0 auto;
}

.service-price-card {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    padding: 2.5rem;
    border-radius: var(--border-radius-lg);
    text-align: center;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-lg);
}

.service-price-label {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.service-price-amount {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.service-price-note {
    font-size: 0.95rem;
    opacity: 0.85;
    margin-bottom: 1.5rem;
}

.service-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.info-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    border-left: 4px solid var(--color-accent);
}

.info-card h3 {
    color: var(--color-primary);
    font-size: 1.375rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.info-card p {
    color: var(--color-text);
    line-height: 1.8;
}

.service-cta {
    background: var(--color-bg-light);
    padding: 3rem;
    border-radius: var(--border-radius-lg);
    text-align: center;
}

.service-cta h2 {
    color: var(--color-primary);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.service-cta p {
    color: var(--color-text-light);
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

/* ========== Perfil Profesional ========== */
.profile-section {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    align-items: start;
    max-width: 1100px;
    margin: 0 auto;
}

.profile-image-wrapper {
    text-align: center;
    position: sticky;
    top: 120px;
}

.profile-avatar {
    width: 280px;
    height: 280px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 6rem;
    font-weight: 700;
    box-shadow: var(--shadow-xl);
    position: relative;
}

.profile-avatar::before {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-accent), var(--color-primary));
    opacity: 0.2;
    z-index: -1;
}

.profile-info h2 {
    font-size: 2.75rem;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.profile-info h3 {
    font-size: 1.375rem;
    color: var(--color-text-light);
    margin-bottom: 3rem;
    font-weight: 500;
}

.profile-block {
    margin-bottom: 3rem;
}

.profile-block h4 {
    font-size: 1.625rem;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--color-accent);
    font-weight: 600;
}

.profile-block ul {
    list-style: none;
}

.profile-block li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
    color: var(--color-text);
    line-height: 1.8;
}

.profile-block li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--color-accent);
    font-size: 1.25rem;
    font-weight: bold;
}

.highlight-box {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    margin-top: 1rem;
}

/* ========== Sección de Contacto ========== */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.contact-card {
    background: white;
    padding: 2.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: var(--transition-base);
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.contact-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    display: block;
}

.contact-card h3 {
    color: var(--color-primary);
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.contact-card p {
    color: var(--color-text);
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    word-break: break-word;
    overflow-wrap: break-word;
}

.contact-card a {
    color: var(--color-primary);
    font-weight: 500;
    display: inline-block;
    margin-top: 0.5rem;
}

.contact-card a:hover {
    color: var(--color-secondary);
}

/* ========== Footer ========== */
.main-footer {
    background: var(--color-dark);
    color: white;
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--color-accent);
}

.footer-section h4 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: white;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition-base);
}

.footer-links a:hover {
    color: var(--color-accent);
    padding-left: 5px;
}

.footer-contact {
    list-style: none;
}

.footer-contact li {
    margin-bottom: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

.footer-bottom p {
    margin: 0.5rem 0;
}

.footer-legal {
    font-size: 0.9rem;
}

/* ========== Botón flotante de WhatsApp ========== */
.whatsapp-float {
    position: fixed;
    width: 65px;
    height: 65px;
    bottom: 30px;
    right: 30px;
    background: var(--color-whatsapp);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    z-index: 999;
    transition: var(--transition-base);
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-xl);
}

.whatsapp-float svg {
    width: 38px;
    height: 38px;
}

/* ========== Animaciones ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        box-shadow: var(--shadow-lg);
    }
    50% {
        box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
    }
}

/* ========== Responsive ========== */
@media (max-width: 1024px) {
    .profile-section {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .profile-image-wrapper {
        position: static;
    }
    
    .profile-block li {
        text-align: left;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .nav-toggle {
        display: flex;
        z-index: 1001;
    }
    
    .nav-menu {
        position: fixed;
        top: 73px;
        left: 0;
        right: 0;
        background: var(--color-primary);
        flex-direction: column;
        padding: 0;
        gap: 0;
        box-shadow: var(--shadow-lg);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease;
        z-index: 999;
    }
    
    .nav-menu.active {
        max-height: calc(100vh - 73px);
        overflow-y: auto;
        padding: 1rem 0;
    }
    
    .nav-item {
        width: 100%;
        padding: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-item:last-child {
        border-bottom: none;
    }
    
    .nav-link {
        display: block;
        width: 100%;
        padding: 1rem 1.5rem;
        text-align: left;
    }
    
    .nav-link::after {
        display: none;
    }
    
    /* Submenú en móvil */
    .submenu {
        position: static;
        min-width: 100%;
        margin: 0;
        border-radius: 0;
        box-shadow: none;
        background: rgba(0, 0, 0, 0.2);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease;
        opacity: 1;
        visibility: visible;
        transform: none;
    }
    
    .nav-item.has-submenu:hover .submenu {
        max-height: 0;
    }
    
    .nav-item.has-submenu.submenu-open .submenu {
        max-height: 600px;
    }
    
    .submenu-item {
        padding: 0.875rem 1.5rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        background: transparent;
    }
    
    .submenu-item:hover {
        background: rgba(255, 255, 255, 0.1);
        padding-left: 1.5rem;
    }
    
    .submenu-title {
        color: white;
    }
    
    .submenu-price {
        color: rgba(255, 255, 255, 0.8);
    }
    
    .hero {
        padding: 110px 1rem 60px;
        min-height: auto;
    }
    
    .hero h1 {
        font-size: 1.875rem;
        line-height: 1.3;
        margin-bottom: 1rem;
    }
    
    .hero p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 0.875rem;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 100%;
    }
    
    .section {
        padding: 60px 1.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .section-subtitle {
        font-size: 1.125rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    
    .service-header h1 {
        font-size: 2rem;
    }
    
    .service-header-icon {
        font-size: 3.5rem;
    }
    
    .service-price-amount {
        font-size: 2.5rem;
    }
    
    .service-info-grid {
        grid-template-columns: 1fr;
    }
    
    .profile-avatar {
        width: 220px;
        height: 220px;
        font-size: 4.5rem;
    }
    
    .profile-info h2 {
        font-size: 2rem;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .whatsapp-float {
        width: 55px;
        height: 55px;
        bottom: 20px;
        right: 20px;
    }
    
    .whatsapp-float svg {
        width: 32px;
        height: 32px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.875rem;
    }
    
    .btn {
        width: 100%;
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .hero {
        padding: 100px 0.875rem 50px;
    }
    
    .hero h1 {
        font-size: 1.625rem;
    }
    
    .hero p {
        font-size: 0.95rem;
    }
    
    .section {
        padding: 50px 0.875rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    .service-detail {
        padding: 100px 0.875rem 50px;
    }
    
    .service-header h1 {
        font-size: 1.625rem;
    }
    
    .service-cta {
        padding: 1.5rem 1rem;
    }
    
    .profile-avatar {
        width: 180px;
        height: 180px;
        font-size: 3.5rem;
    }
    
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 15px;
        right: 15px;
    }
    
    .whatsapp-float svg {
        width: 28px;
        height: 28px;
    }
}

