/* Custom styles for Trigo Quiroga Ramón - Abogado */

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

/* Smooth scroll for anchor links */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

/* Selection color */
::selection {
    background-color: #a11738;
    color: #fff;
}

/* Body background gradient */
body {
    background: linear-gradient(180deg, #fefcfb 0%, #fdf8f5 100%);
}

/* Navbar scroll effect */
#navbar.scrolled {
    background: rgba(254, 252, 251, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 1px 20px rgba(110, 22, 51, 0.08);
}

/* Mobile menu */
.mobile-menu {
    z-index: 51;
}

.mobile-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(161, 23, 56, 0.1);
}

.mobile-link:last-child {
    border-bottom: none;
}

/* Menu animation */
.menu-line {
    transition: all 0.3s ease;
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menuBtn.active .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Decorative line animation */
.decorative-line {
    position: relative;
    overflow: hidden;
}

.decorative-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Service card icon hover */
.service-card:hover .w-14 {
    background-color: #a11738;
    transition: background-color 0.3s ease;
}

.service-card:hover .w-14 svg {
    stroke: #fff;
    transition: stroke 0.3s ease;
}

/* Form focus styles */
input:focus,
textarea:focus,
select:focus {
    box-shadow: 0 0 0 3px rgba(161, 23, 56, 0.1);
}

/* Button active state */
.btn-primary:active {
    transform: scale(0.98);
}

/* Print styles */
@media print {
    nav, .mobile-menu, #contactForm, .animate-float {
        display: none !important;
    }
    
    body {
        background: #fff !important;
        color: #000 !important;
    }
    
    .service-card {
        break-inside: avoid;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .service-card {
        border-width: 2px;
    }
    
    .btn-primary {
        border: 2px solid currentColor;
    }
}

/* Landscape mobile */
@media (max-height: 500px) and (orientation: landscape) {
    #inicio {
        min-height: auto;
        padding-top: 100px;
        padding-bottom: 60px;
    }
    
    .hero-float-card {
        display: none;
    }
}

/* Focus visible for keyboard navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #a11738;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Tablet adjustments */
@media (min-width: 768px) and (max-width: 1023px) {
    .hero-float-card:nth-child(3) {
        display: none;
    }
}

/* Large screens */
@media (min-width: 1280px) {
    .service-card {
        padding: 2.5rem;
    }
}
