/* PRO TEC Entrance Automation - Main Public Stylesheet */

/* --- RESET & GENERAL --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-family: var(--font-body);
    background-color: var(--dark);
    color: var(--text-primary);
}

body {
    overflow-x: hidden;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

/* --- UTILITIES --- */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.section {
    padding: 80px 0;
}

.section-bg {
    background-color: var(--dark-secondary);
}

.text-orange {
    color: var(--primary);
}

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

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.section-subtitle {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 50px auto;
    font-size: 1.1rem;
}

/* --- BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: var(--border-radius);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all var(--transition-normal);
    border: none;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 138, 0, 0.4);
}

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

.btn-secondary:hover {
    background-color: var(--white);
    color: var(--dark);
    transform: translateY(-2px);
}

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

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

/* --- HEADER / NAVIGATION --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

header.scrolled {
    padding: 5px 0;
    background-color: #ffffff;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    transition: all var(--transition-normal);
}

header.scrolled .header-container {
    height: 65px;
}

.logo-badge {
    background-color: var(--white);
    padding: 10px 24px;
    border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    transition: all var(--transition-normal);
    z-index: 1002;
    margin-top: 10px;
    align-self: flex-start;
}

header.scrolled .logo-badge {
    height: 80px;
    margin-top: 5px;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.05);
}

.logo-link {
    display: flex;
    align-items: center;
}

.logo-svg {
    height: 65px;
    width: auto;
    transition: all var(--transition-normal);
}

header.scrolled .logo-svg {
    height: 50px;
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-link {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    position: relative;
    padding: 10px 0;
}

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

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

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

.header-contact-btn {
    display: flex;
    align-items: center;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    box-sizing: border-box;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--text-primary);
    transition: var(--transition-normal);
    border-radius: 2px;
}

/* --- HERO BANNER --- */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding-top: 100px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 40%, rgba(15, 23, 42, 0.45) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    background-color: rgba(255, 122, 0, 0.1);
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3.8rem;
    line-height: 1.1;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 25px;
    letter-spacing: -1px;
    color: var(--white);
}

.hero-desc {
    font-size: 1.15rem;
    color: var(--text-light-secondary);
    margin-bottom: 40px;
    max-width: 600px;
}

.hero-btns {
    display: flex;
    gap: 20px;
}

/* --- CARDS & GRIDS --- */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 50px;
    align-items: center;
}

.card {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

.card-img-wrapper {
    position: relative;
    padding-bottom: 60%;
    background-color: var(--dark-secondary);
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}

.card-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.card-img-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform var(--transition-slow);
}

.card-img-contain {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    background-color: var(--dark-secondary);
    transition: transform var(--transition-slow);
}

.card:hover .card-img, .card:hover .card-img-cover, .card:hover .card-img-contain {
    transform: scale(1.04);
}

.card-body {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    line-height: 1.4;
    color: var(--text-primary);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 3.36rem;
}

.card-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
    flex-grow: 1;
}

.card-actions-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 10px;
    margin-top: auto;
    width: 100%;
}

.btn-whatsapp {
    background-color: #25D366;
    color: var(--white);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.2);
}

.btn-whatsapp:hover {
    background-color: #20ba5a;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(37, 211, 102, 0.3);
    color: var(--white);
}

/* --- STATS COUNTER --- */
.stats-section {
    background: linear-gradient(135deg, var(--dark-secondary) 0%, var(--dark) 100%);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 60px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    text-align: center;
}

.stat-item .stat-number {
    font-family: var(--font-stats);
    font-size: 4rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 5px;
}

.stat-item .stat-label {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

/* --- RECENT PROJECTS FILTERABLE --- */
.project-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    background-color: var(--dark-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    transition: all var(--transition-fast);
}

.filter-btn:hover, .filter-btn.active {
    background-color: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.project-card {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    height: 350px;
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.project-card:hover .project-img {
    transform: scale(1.08);
}

.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    background: linear-gradient(to top, rgba(17,17,17,0.95) 0%, rgba(17,17,17,0) 100%);
    color: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.project-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.project-location {
    font-size: 0.85rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Before / After Slider Component */
.ba-container {
    position: relative;
    width: 100%;
    height: 350px;
    overflow: hidden;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.ba-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.ba-before {
    z-index: 2;
    width: 50%;
    border-right: 2px solid var(--primary);
}

.ba-label {
    position: absolute;
    bottom: 20px;
    background-color: rgba(17,17,17,0.85);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ba-before .ba-label {
    left: 20px;
}

.ba-after .ba-label {
    right: 20px;
}

/* --- FORMS & LEADS CAPTURE --- */
.contact-form-wrapper {
    background-color: var(--dark-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    box-shadow: var(--box-shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    background-color: var(--dark);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-captcha {
    display: flex;
    align-items: center;
    gap: 15px;
}

.captcha-question {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary);
    background-color: var(--dark-secondary);
    padding: 10px 15px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    min-width: 100px;
    text-align: center;
}

/* Flash notifications */
.flash-message {
    padding: 15px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 25px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.flash-success {
    background-color: rgba(46, 204, 113, 0.15);
    border: 1px solid var(--success);
    color: var(--success);
}

.flash-error {
    background-color: rgba(231, 76, 60, 0.15);
    border: 1px solid var(--danger);
    color: var(--danger);
}

/* --- FOOTER --- */
footer {
    background-color: var(--bg-dark-section);
    border-top: 1px solid var(--border-dark);
    padding: 80px 0 30px 0;
    color: var(--text-light-secondary);
    font-size: 0.95rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 50px;
    margin-bottom: 60px;
}

.footer-about .footer-logo {
    height: 48px;
    margin-bottom: 20px;
}

.footer-about p {
    margin-bottom: 20px;
    color: var(--text-light-secondary);
}

.footer-socials {
    display: flex;
    gap: 15px;
}

.footer-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: var(--bg-dark-secondary);
    border: 1px solid var(--border-dark);
    border-radius: 50%;
    color: var(--text-light-secondary);
    transition: all var(--transition-fast);
}

.footer-social-link:hover {
    background-color: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.footer-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--white);
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-link {
    color: var(--text-light-secondary);
}

.footer-link:hover {
    color: var(--primary);
    padding-left: 5px;
}

.footer-contact-item {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    color: var(--text-light-secondary);
}

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

.footer-bottom {
    border-top: 1px solid var(--border-dark);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.85rem;
    color: var(--text-light-muted);
}

/* --- STICKY FLOATING ACTIONS --- */
.floating-actions {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 999;
}

.floating-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    color: var(--white);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: all var(--transition-normal);
    position: relative;
}

.floating-btn:hover {
    transform: scale(1.1);
}

.floating-whatsapp {
    background-color: #25D366;
}

.floating-whatsapp::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid #25D366;
    animation: pulse 2s infinite;
    z-index: -1;
}

.floating-call {
    background-color: var(--primary);
}

.floating-btn svg {
    width: 26px;
    height: 26px;
    fill: currentColor;
}

/* Sticky bottom nav for mobile devices */
.mobile-sticky-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--dark-secondary);
    border-top: 1px solid var(--border-color);
    z-index: 998;
    height: 60px;
}

.mobile-sticky-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    height: 100%;
}

.mobile-sticky-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-secondary);
    border-right: 1px solid var(--border-color);
}

.mobile-sticky-item:last-child {
    border-right: none;
}

.mobile-sticky-item svg {
    width: 20px;
    height: 20px;
    margin-bottom: 4px;
}

.mobile-sticky-item.active-action {
    background-color: var(--primary);
    color: var(--white);
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

/* --- SEO & LOCAL DATA FOOTPRINT --- */
.seo-footprint-box {
    border-left: 4px solid var(--primary);
    background-color: var(--dark-secondary);
    padding: 30px;
    border-radius: var(--border-radius);
    margin-top: 50px;
}

.seo-footprint-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.seo-areas-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.seo-area-tag {
    background-color: var(--dark);
    border: 1px solid var(--border-color);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.detail-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    text-transform: uppercase;
    font-weight: 800;
    line-height: 1.3;
    color: var(--text-primary);
}

/* --- RESPONSIVE MEDIA QUERIES --- */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 991px) {
    .section-title {
        font-size: 2.2rem;
    }
    .hero-title {
        font-size: 2.8rem;
    }
    
    /* Mobile Logo Badge Sizing */
    .logo-badge {
        height: 70px;
        margin-top: 0;
        padding: 5px 10px;
        border: none;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
    }
    .logo-svg {
        height: 52px;
    }

    /* Half Menu - Sliding Drawer from Right */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -300px;
        width: 300px;
        height: 100vh;
        background-color: var(--bg-dark-section);
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 100px 30px 40px 30px;
        transition: right var(--transition-normal);
        z-index: 1005; /* Increase to be above logo-badge */
        box-shadow: -5px 0 25px rgba(15, 23, 42, 0.2);
        gap: 10px;
        left: auto;
    }
    .nav-menu.open {
        right: 0;
    }
    .nav-menu .nav-link {
        color: rgba(255, 255, 255, 0.8) !important;
        width: 100%;
        padding: 12px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        font-size: 1.05rem;
    }
    .nav-menu .nav-link:hover, .nav-menu .nav-link.active {
        color: var(--primary) !important;
        border-bottom-color: var(--primary);
    }
    .nav-menu .nav-link::after {
        display: none; /* Hide desktop animated lines */
    }

    .menu-toggle {
        display: flex !important;
        z-index: 1006; /* Keep above drawer */
        position: relative;
    }
    /* Change hamburger color to white/orange when open for contrast on dark drawer background */
    .menu-toggle.open span {
        background-color: var(--white) !important;
    }

    .header-contact-btn {
        display: none;
    }

    /* Mobile Menu Backdrop Overlay */
    .nav-menu-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(15, 23, 42, 0.6);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-normal);
        z-index: 1004; /* Increase to cover logo-badge */
    }
    .nav-menu-backdrop.open {
        opacity: 1;
        visibility: visible;
    }

    .floating-actions {
        bottom: 80px; /* Shift up to avoid blocking mobile-sticky-nav */
        right: 20px;
    }
    .mobile-sticky-nav {
        display: block;
    }
    body {
        padding-bottom: 60px; /* Avoid overlapping sticky-nav */
    }
}

@media (max-width: 768px) {
    .detail-title {
        font-size: 1.3rem;
    }
    .section-title {
        font-size: 2.0rem;
    }
    .hero-title {
        font-size: 2.2rem;
    }
    .hero-btns {
        flex-direction: column;
        gap: 10px;
    }
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
        gap: 25px;
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .section {
        padding: 50px 0;
    }
    .contact-form-wrapper {
        padding: 20px;
    }
}
