/* ============================================ */
/* NAVBAR STYLES - LOGIXCARE INSPIRED (BLACK) */
/* ============================================ */

:root {
    --navbar-bg: #111111;
    --navbar-text: #ffffff;
    --navbar-hover: #E30613;
    --navbar-border: #333333;
    --navbar-text-light: #cccccc;
    --mobile-menu-bg: #1a1a1a;
    --transition: 0.3s ease;
}

/* ============================================ */
/* NAVBAR CONTAINER */
/* ============================================ */
.navbar {
    background-color: var(--navbar-bg);
    border-bottom: 1px solid var(--navbar-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: auto;
    min-height: 60px;
}

@media (min-width: 768px) {
    .navbar-container {
        min-height: 70px;
        padding: 0 24px;
    }
}

@media (min-width: 1200px) {
    .navbar-container {
        min-height: 80px;
        padding: 0 40px;
    }
}

/* ============================================ */
/* LOGO */
/* ============================================ */
.navbar-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
    margin-right: 40px;
}

.navbar-logo img {
    height: 55px;
    width: auto;
    display: block;
    object-fit: contain;
}

/* ============================================ */
/* DESKTOP MENU */
/* ============================================ */
.navbar-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 30px;
    align-items: center;
    margin-left: auto;
    margin-right: 40px;
}

.navbar-menu .nav-link {
    color: var(--navbar-text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color var(--transition);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.navbar-menu .nav-link:hover {
    color: var(--navbar-hover);
}

.dropdown-icon {
    font-size: 12px;
    transition: transform var(--transition);
    color: #ffffff;
    font-weight: bold;
}

.nav-dropdown:hover .dropdown-icon {
    transform: scaleY(-1);
}

/* Dropdown Menu */
.nav-dropdown {
    position: relative;
}

.nav-dropdown::after {
    content: '';
    position: absolute;
    bottom: -40px;
    left: 0;
    right: 0;
    height: 40px;
    pointer-events: auto;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: -10px;
    background-color: #1a1a1a;
    list-style: none;
    margin: 0;
    padding: 12px 0;
    min-width: 220px;
    border-radius: 8px;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.5);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: none;
    margin-top: 15px;
    border: 1px solid #333333;
}

.nav-dropdown:hover > .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu li:last-child {
    border-bottom: none;
}

.dropdown-menu a {
    display: block;
    color: var(--navbar-text);
    text-decoration: none;
    padding: 11px 18px;
    font-size: 14px;
    transition: all 0.2s;
}

.dropdown-menu a:hover {
    background-color: #333333;
    color: var(--navbar-hover);
}

/* Enhanced Dropdown Items with Icons and Descriptions */
.dropdown-with-icons .dropdown-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px !important;
}

.dropdown-item-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
    margin-top: 2px;
}

.dropdown-item-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dropdown-item-title {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--navbar-text);
}

.dropdown-item-description {
    display: block;
    font-size: 12px;
    color: #999999;
    line-height: 1.3;
}

.dropdown-with-icons .dropdown-item:hover .dropdown-item-title {
    color: var(--navbar-hover);
}

.dropdown-with-icons .dropdown-item:hover .dropdown-item-description {
    color: #bbbbbb;
}

/* 3-Column Dropdown Layout */
.dropdown-3-columns {
    display: flex !important;
    flex-wrap: nowrap;
    padding: 20px !important;
    gap: 20px !important;
    width: calc(100vw - 40px) !important;
    max-width: 800px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    margin: 0 !important;
    margin-top: 20px !important;
    position: absolute !important;
}

.dropdown-column {
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 1;
    list-style: none;
    padding: 0;
    margin: 0;
}

.dropdown-column li {
    margin: 0;
    padding: 0;
}

.dropdown-column li:last-child {
    border-bottom: none;
}

.dropdown-column .dropdown-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0 !important;
    border-bottom: 1px solid #333333;
}

.dropdown-column li:last-child .dropdown-item {
    border-bottom: none;
}

/* ============================================ */
/* NAVBAR RIGHT (Language + CTA) */
/* ============================================ */
.navbar-right {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-shrink: 0;
}

/* Language Selector */
.language-selector {
    display: flex;
    gap: 4px;
    align-items: center;
    border: 1px solid rgba(227, 6, 19, 0.3);
    border-radius: 20px;
    padding: 6px 8px;
    background: transparent;
    transition: all var(--transition);
}

.language-selector:hover {
    border-color: rgba(227, 6, 19, 0.6);
    background: rgba(227, 6, 19, 0.05);
}

.lang-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #ffffff;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all var(--transition);
    min-width: auto;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.lang-btn:hover {
    color: var(--navbar-hover);
    background: rgba(227, 6, 19, 0.1);
}

.lang-btn.active {
    background-color: var(--navbar-hover);
    color: white;
    font-weight: 700;
}

/* CTA Button */
.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: #E30613;
    color: white;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    transition: all var(--transition);
    border: none;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(227, 6, 19, 0.2);
}

.cta-button img {
    width: 20px;
    height: 20px;
    display: block;
}

.cta-button:hover {
    background-color: #C9000C;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(227, 6, 19, 0.35);
}

.cta-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(227, 6, 19, 0.25);
}

/* ============================================ */
/* HAMBURGER MENU (Mobile) */
/* ============================================ */
.hamburger-menu {
    display: none;
    flex-direction: column;
    background: transparent;
    border: none;
    cursor: pointer;
    gap: 5px;
    padding: 10px !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
}

.hamburger-menu span {
    width: 24px;
    height: 2px;
    background-color: #ffffff;
    border-radius: 1px;
    transition: all var(--transition);
}

.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(10px, 10px);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ============================================ */
/* MOBILE MENU - IMPROVED UX */
/* ============================================ */
.mobile-menu {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    max-width: 280px;
    height: 100vh;
    background-color: #1a1a1a;
    z-index: 1002;
    transform: translateX(-100%);
    transition: transform var(--transition);
    flex-direction: column;
    border-right: 1px solid var(--navbar-border);
    overflow-x: hidden;
    box-sizing: border-box;
}

.mobile-menu.active {
    display: flex;
    transform: translateX(0);
}

/* Remove body margin when mobile menu is active */
body:has(.mobile-menu.active) {
    margin-top: 0 !important;
    overflow: hidden;
}

.mobile-menu-header {
    position: sticky;
    top: 0;
    width: 100%;
    height: 70px;
    background-color: #111111;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 12px;
    border-bottom: 1px solid var(--navbar-border);
    flex-shrink: 0;
    z-index: 10;
    box-sizing: border-box;
}

.mobile-logo {
    height: 40px;
    width: auto;
}

.mobile-close {
    background: transparent;
    border: none;
    color: var(--navbar-text);
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background-color var(--transition);
}

.mobile-close:active {
    background-color: var(--navbar-border);
}

.mobile-menu-items {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
    overflow-y: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.mobile-link {
    display: block;
    color: var(--navbar-text);
    text-decoration: none;
    padding: 14px 16px;
    border-bottom: 1px solid var(--navbar-border);
    transition: all var(--transition);
    font-size: 15px;
    font-weight: 500;
    word-break: break-word;
    overflow-wrap: break-word;
    box-sizing: border-box;
}

.mobile-link:active {
    background-color: var(--navbar-border);
    color: var(--navbar-hover);
}

.mobile-link.mobile-cta {
    background-color: #111111;
    color: white;
    text-align: center;
    border-bottom: none;
    margin: 10px 15px 0 15px;
    border-radius: 6px;
    font-weight: 600;
}

.mobile-link.mobile-cta:active {
    background-color: var(--navbar-hover);
}

/* Mobile Dropdown */
.mobile-dropdown .mobile-toggle {
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    color: var(--navbar-text);
    padding: 14px 16px;
    border-bottom: 1px solid var(--navbar-border);
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: all var(--transition);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    box-sizing: border-box;
    word-break: break-word;
    overflow-wrap: break-word;
}

.mobile-toggle:active {
    background-color: var(--navbar-border);
}

.mobile-toggle::after {
    content: '▼';
    font-size: 11px;
    transition: transform var(--transition);
    color: var(--navbar-text-light);
}

.mobile-toggle.active::after {
    transform: rotate(180deg);
    color: var(--navbar-hover);
}

.mobile-submenu {
    display: none;
    list-style: none;
    margin: 6px 10px 12px 10px;
    padding: 8px 0;
    background-color: #fafafa;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--navbar-border);
    box-sizing: border-box;
}

.mobile-submenu.active {
    display: block;
}

.mobile-submenu li {
    margin: 0;
}

.mobile-submenu a {
    display: block;
    color: var(--navbar-text);
    text-decoration: none;
    padding: 12px 14px;
    padding-left: 24px;
    font-size: 14px;
    transition: all var(--transition);
    border-left: 3px solid transparent;
    word-break: break-word;
    overflow-wrap: break-word;
    box-sizing: border-box;
}

.mobile-submenu a:active {
    background-color: var(--navbar-border);
    color: var(--navbar-hover);
    border-left-color: var(--navbar-hover);
}

.mobile-menu-footer {
    padding: 12px 12px;
    border-top: 1px solid var(--navbar-border);
    flex-shrink: 0;
    box-sizing: border-box;
}

.mobile-whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: white;
    text-decoration: none;
    padding: 11px 15px;
    background-color: var(--navbar-hover);
    border-radius: 6px;
    transition: all var(--transition);
    font-size: 14px;
    font-weight: 600;
}

.mobile-whatsapp:active {
    opacity: 0.85;
}

/* ============================================ */
/* MOBILE OVERLAY */
/* ============================================ */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1001;
}

.mobile-overlay.active {
    display: block;
}

/* ============================================ */
/* RESPONSIVE DESIGN */
/* ============================================ */

/* Tablet (768px - 1199px) */
@media (max-width: 1199px) {
    .navbar-menu {
        gap: 18px;
        margin-right: 20px;
    }

    .navbar-menu .nav-link {
        font-size: 13px;
    }

    .dropdown-menu {
        min-width: 200px;
    }

    .cta-button {
        padding: 8px 16px;
        font-size: 12px;
    }
}

/* Mobile (<768px) */
@media (max-width: 767px) {
    .navbar-container {
        height: 60px;
        padding: 0 15px;
    }

    .navbar-logo img {
        height: 40px;
    }

    .navbar-menu {
        display: none;
    }

    .hamburger-menu {
        display: flex;
    }

    .navbar-right {
        gap: 12px;
        margin-left: auto;
    }

    .language-selector {
        display: none;
    }

    .cta-button {
        padding: 8px 14px;
        font-size: 12px;
    }
}

/* ============================================ */
/* ACCESSIBILITY */
/* ============================================ */
.navbar a:focus,
.navbar button:focus {
    outline: 2px solid var(--navbar-hover);
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .navbar a,
    .navbar button,
    .mobile-menu {
        transition: none;
    }
}

/* ============================================ */
/* SERVICES CARDS SECTION - IMPROVED UX */
/* ============================================ */
.services-cards-section {
    padding: 60px 20px;
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
    border-top: 1px solid var(--navbar-border);
    border-bottom: 1px solid var(--navbar-border);
}

.services-cards-container {
    max-width: 1200px;
    margin: 0 auto;
}

.services-cards-header {
    text-align: center;
    margin-bottom: 50px;
}

.services-cards-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--navbar-text);
    margin: 0 0 12px 0;
}

.services-cards-subtitle {
    font-size: 16px;
    color: #cccccc;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.service-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border: 1px solid var(--navbar-border);
    border-radius: 12px;
    padding: 30px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.service-card:hover {
    border-color: var(--navbar-hover);
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(227, 6, 19, 0.2);
}

.service-card h3 {
    color: var(--navbar-text);
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
}

.service-card p {
    color: #aaaaaa;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
    flex: 1;
}

.card-link {
    color: var(--navbar-hover);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-block;
    align-self: flex-start;
}

.card-link:hover {
    color: #ffffff;
    transform: translateX(4px);
}

/* RESPONSIVE DESIGN FOR CARDS */
@media (max-width: 1199px) {
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }

    .services-cards-title {
        font-size: 28px;
    }

    .service-card {
        padding: 24px;
    }
}

@media (max-width: 767px) {
    .services-cards-section {
        padding: 40px 15px;
    }

    .services-cards-header {
        margin-bottom: 30px;
    }

    .services-cards-title {
        font-size: 24px;
    }

    .services-cards-subtitle {
        font-size: 14px;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .service-card {
        padding: 20px;
        gap: 12px;
    }

    .service-card h3 {
        font-size: 16px;
    }

    .service-card p {
        font-size: 13px;
    }
}

/* ============================================ */
/* FASE 4: RESPONSIVE NAVBAR MENU - NEW IMPLEMENTATION */
/* ============================================ */

/* MOBILE (<768px): Full-screen overlay menu */
@media (max-width: 767px) {
    /* Hide desktop menu on mobile */
    .navbar-menu {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        height: calc(100vh - 60px);
        flex-direction: column;
        gap: 0;
        background-color: #1a1a1a;
        z-index: 998;
        overflow-y: auto;
        padding: 20px 0;
        border: none;
    }

    /* Show menu when active */
    .navbar-menu.active {
        display: flex;
    }

    /* Mobile menu items styling */
    .navbar-menu li {
        border-bottom: 1px solid #333333;
        margin: 0;
    }

    .navbar-menu .nav-link {
        padding: 16px 20px;
        display: block;
        color: #ffffff;
        text-decoration: none;
        font-size: 16px;
        font-weight: 500;
        transition: background-color 0.2s ease;
    }

    .navbar-menu .nav-link:hover {
        background-color: #2a2a2a;
        color: #E30613;
    }

    /* Dropdowns in mobile */
    .navbar-menu .nav-dropdown > .nav-link {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .navbar-menu .dropdown-icon {
        transition: transform 0.3s ease;
    }

    .navbar-menu .nav-dropdown.active .dropdown-icon {
        transform: rotate(180deg);
    }

    .navbar-menu .dropdown-menu {
        position: static;
        display: none;
        flex-direction: column;
        background-color: #0f0f0f;
        border: none;
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 0;
        gap: 0;
        transform: none;
        left: auto;
        box-shadow: none;
    }

    .navbar-menu .nav-dropdown.active .dropdown-menu {
        display: flex;
    }

    .navbar-menu .dropdown-menu li {
        padding: 0;
        border: none;
        border-top: 1px solid #222222;
    }

    .navbar-menu .dropdown-menu a {
        padding: 12px 40px;
        color: #cccccc;
        font-size: 14px;
        font-weight: 400;
    }

    .navbar-menu .dropdown-menu a:hover {
        background-color: #1a1a1a;
        color: #E30613;
    }

    /* Hamburger button styling on mobile */
    .hamburger-menu {
        display: block;
        background-color: transparent;
        border: none;
        cursor: pointer;
        width: 40px;
        height: 40px;
        padding: 8px;
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        align-items: center;
    }

    .hamburger-menu span {
        display: block;
        width: 24px;
        height: 3px;
        background-color: #ffffff;
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    .hamburger-menu.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

    .hamburger-menu.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger-menu.active span:nth-child(3) {
        transform: rotate(-45deg) translate(8px, -8px);
    }

    /* Hide language selector on mobile (will show in menu) */
    .navbar-right .language-selector {
        display: none;
    }

    /* Hide CTA button on mobile (will show in menu) */
    .navbar-right .cta-button {
        display: none;
    }

    /* Mobile menu footer styling */
    .navbar-menu-footer {
        display: none;
        flex-direction: column;
        gap: 15px;
        padding: 20px;
        border-top: 1px solid #333333;
        background-color: #0f0f0f;
        position: fixed;
        bottom: 60px;
        left: 0;
        right: 0;
        z-index: 998;
        width: 100%;
        box-sizing: border-box;
    }

    .navbar-menu.active ~ .navbar-menu-footer {
        display: flex;
    }

    /* Language selector in mobile menu */
    .language-selector-mobile {
        display: flex;
        gap: 10px;
        justify-content: center;
    }

    .language-selector-mobile .lang-btn {
        padding: 8px 16px;
        background-color: transparent;
        color: #ffffff;
        border: 1px solid #555555;
        border-radius: 4px;
        cursor: pointer;
        font-size: 12px;
        font-weight: 600;
        transition: all 0.3s ease;
    }

    .language-selector-mobile .lang-btn:hover {
        background-color: #333333;
        color: #E30613;
    }

    .language-selector-mobile .lang-btn.active {
        background-color: rgba(227, 6, 19, 0.15);
        color: #E30613;
        border-color: #E30613;
    }

    /* CTA button in mobile menu */
    .cta-button-mobile {
        display: block;
        padding: 12px 16px;
        background-color: #E30613;
        color: #ffffff;
        text-decoration: none;
        text-align: center;
        border-radius: 4px;
        font-weight: 600;
        font-size: 14px;
        transition: all 0.3s ease;
        box-sizing: border-box;
        width: 100%;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .cta-button-mobile:hover {
        background-color: #c9000c;
        transform: translateY(-2px);
    }

    /* Prevent body scroll when menu open */
    body.menu-open {
        overflow: hidden;
    }
}

/* TABLET (768px - 1199px): Show menu horizontally */
@media (min-width: 768px) and (max-width: 1199px) {
    .navbar-menu {
        display: flex !important;
        position: static !important;
        width: auto !important;
        height: auto !important;
        flex-direction: row !important;
        gap: 15px !important;
        background-color: transparent !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    .navbar-menu li {
        border: none !important;
        margin: 0 !important;
    }

    .navbar-menu .nav-link {
        padding: 8px 12px !important;
        font-size: 14px !important;
    }

    /* Hide hamburger on tablet */
    .hamburger-menu {
        display: none !important;
    }

    /* Dropdowns reduce hover zone on tablet */
    .nav-dropdown::after {
        height: 30px !important;
        bottom: -30px !important;
    }

    /* Language selector visible on tablet */
    .navbar-right .language-selector {
        display: flex;
    }

    /* CTA button visible on tablet */
    .navbar-right .cta-button {
        display: inline-block;
    }
}

/* DESKTOP (≥1200px): Current design - no changes */
@media (min-width: 1200px) {
    .navbar-menu {
        display: flex !important;
        position: static !important;
    }

    .hamburger-menu {
        display: none !important;
    }

    .navbar-right .language-selector {
        display: flex;
    }

    .navbar-right .cta-button {
        display: inline-block;
    }
}
