/* ============================================================
   GENERATIONS CONTRACTORS - MAIN STYLESHEET
   ============================================================ */

/* ===== FILTER BUTTONS ===== */
.filter-btn {
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    background: #fff;
    border: 1px solid #e5e7eb;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    white-space: nowrap;
}
.filter-btn:hover {
    border-color: #E67E22;
    color: #E67E22;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(230, 126, 34, 0.15);
}
.filter-btn.active {
    background: linear-gradient(135deg, #E67E22, #D35400);
    color: #fff;
    border-color: #E67E22;
    box-shadow: 0 4px 15px rgba(230, 126, 34, 0.35);
}
.dark .filter-btn {
    background: #27272A;
    border-color: #3F3F46;
    color: #D1D5DB;
}
.dark .filter-btn:hover {
    border-color: #E67E22;
    color: #E67E22;
}
.dark .filter-btn.active {
    background: linear-gradient(135deg, #E67E22, #D35400);
    color: #fff;
}

/* ===== LINE CLAMP UTILITIES ===== */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== SMOOTH SCROLL ===== */
html {
    scroll-behavior: smooth;
}

/* ===== LOGO STYLING ===== */
.logo-img {
    height: 68px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease, filter 0.3s ease;
}
.logo-img:hover {
    transform: scale(1.05);
}
.logo-fallback {
    display: none;
    height: 48px;
    width: 48px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #E67E22, #D35400);
    color: white;
    font-size: 1.25rem;
    box-shadow: 0 4px 15px rgba(230, 126, 34, 0.35);
}

/* ===== TOP BAR SOCIAL ICONS ===== */
.topbar-social {
    display: flex;
    align-items: center;
    gap: 2px;
}
.topbar-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: #9CA3AF;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}
.topbar-social a:hover {
    transform: translateY(-2px);
    color: white;
}
.topbar-social a.facebook:hover { background: #1877F2; }
.topbar-social a.twitter:hover { background: #000000; }
.topbar-social a.instagram:hover { background: linear-gradient(45deg, #F58529, #DD2A7B, #8134AF); }
.topbar-social a.linkedin:hover { background: #0A66C2; }
.topbar-social a.youtube:hover { background: #FF0000; }
.topbar-social a.tiktok:hover { background: #000000; }
.topbar-social a.whatsapp:hover { background: #25D366; }

/* ===== ENHANCED NAV LINK UNDERLINE ===== */
.nav-link {
    position: relative;
    padding: 0.5rem 0;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: color 0.3s ease;
    color: #374151;
}
.dark .nav-link {
    color: #D1D5DB;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2.5px;
    background: linear-gradient(90deg, #E67E22, #D4A853);
    border-radius: 2px;
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}
.nav-link:hover,
.nav-link.active {
    color: #E67E22;
}
.dark .nav-link:hover,
.dark .nav-link.active {
    color: #F5A623;
}

/* ===== MEGA MENU ===== */
.mega {
    pointer-events: none;
}
.group:hover .mega,
.group:focus-within .mega {
    pointer-events: auto;
}

/* ===== CARD HOVER EFFECTS ===== */
.card-hover {
    transition: all 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}
.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}
.dark .card-hover:hover {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

/* ===== BUTTON ENHANCEMENTS ===== */
.btn-primary {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #E67E22 0%, #D35400 100%);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(230, 126, 34, 0.3);
}
.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #D35400 0%, #A04000 100%);
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}
.btn-primary:hover::before {
    left: 0;
}
.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(230, 126, 34, 0.45);
}
.btn-primary > * {
    position: relative;
    z-index: 1;
}

.btn-outline {
    border: 2px solid #E67E22;
    color: #E67E22;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-outline:hover {
    background: #E67E22;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(230, 126, 34, 0.35);
}

/* ===== SECTION BADGE ===== */
.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    background: linear-gradient(135deg, rgba(230, 126, 34, 0.12), rgba(212, 168, 83, 0.12));
    border: 1px solid rgba(230, 126, 34, 0.25);
    color: #C2570C;
}
.dark .section-badge {
    background: linear-gradient(135deg, rgba(230, 126, 34, 0.15), rgba(212, 168, 83, 0.1));
    color: #F5A623;
}

/* ===== GRADIENT TEXT ===== */
.gradient-text {
    background: linear-gradient(135deg, #E67E22 0%, #D4A853 50%, #E67E22 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== SCROLL REVEAL ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== MOBILE DOCK ===== */
.mobile-dock {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 60;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 24px;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
}
.dark .mobile-dock {
    background: rgba(24, 24, 27, 0.95);
    border-color: rgba(255, 255, 255, 0.08);
}
.mobile-dock.hidden-dock {
    transform: translateY(120%);
}

.dock-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 8px 4px;
    flex: 1;
    min-height: 56px;
    border-radius: 16px;
    transition: all 0.25s ease;
    color: #6B7280;
    position: relative;
}
.dark .dock-item {
    color: #9CA3AF;
}
.dock-item:active {
    transform: scale(0.92);
}
.dock-item.active {
    color: #E67E22;
}
.dock-item.active::before {
    content: '';
    position: absolute;
    top: 3px;
    width: 24px;
    height: 3px;
    background: linear-gradient(90deg, #E67E22, #D4A853);
    border-radius: 2px;
}
.dock-item i {
    font-size: 1.15rem;
}
.dock-item span {
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* ===== THEME TOGGLE ===== */
.theme-toggle {
    position: relative;
    width: 48px;
    height: 26px;
    border-radius: 13px;
    background: #D1D5DB;
    transition: background 0.3s ease;
    cursor: pointer;
    flex-shrink: 0;
    border: none;
    outline: none;
}
.dark .theme-toggle {
    background: #3F3F46;
}
.theme-toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: white;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.dark .theme-toggle::after {
    transform: translateX(22px);
    background: linear-gradient(135deg, #E67E22, #D4A853);
}

/* ===== FORM INPUTS ===== */
.form-input,
form select,
form textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    background: #f9fafb;
    color: #1f2937;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.form-input:focus,
form select:focus,
form textarea:focus {
    border-color: #E67E22;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.15);
}
.dark .form-input,
.dark form select,
.dark form textarea {
    background: #18181B;
    border-color: #3F3F46;
    color: #E5E7EB;
}
.dark .form-input:focus,
.dark form select:focus,
.dark form textarea:focus {
    border-color: #E67E22;
    box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.2);
}
.dark .form-input::placeholder,
.dark form textarea::placeholder {
    color: #6B7280;
}

/* ===== FIELD LABEL ===== */
.field-label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #374151;
}
.dark .field-label {
    color: #D1D5DB;
}

/* ===== ERROR LIST ===== */
form .errorlist {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #dc2626;
    list-style: none;
    padding: 0;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 4px;
}
.dark ::-webkit-scrollbar-thumb {
    background: #3F3F46;
}
::-webkit-scrollbar-thumb:hover {
    background: #E67E22;
}

/* ===== TAP TARGETS ===== */
.tap-target {
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tap-target-sm {
    min-height: 40px;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== VERTICAL TEXT ===== */
.vertical-text {
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    ::before,
    ::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .fade-in {
        opacity: 1;
        transform: none;
    }
}

/* ===== RESPONSIVE HELPERS ===== */
@media (max-width: 1023px) {
    .site-main {
        padding-bottom: 6rem;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .mobile-dock,
    .theme-toggle,
    .topbar,
    nav,
    footer,
    .whatsapp-float {
        display: none !important;
    }
}