/* ==========================================================================
   Main Stylesheet — MD Electrical Theme
   ========================================================================== */

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; -webkit-font-smoothing: antialiased; }

body {
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
    color: var(--white);
    background-color: var(--black-primary);
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-primary); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--gold-light); }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }

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

/* Section */
.section {
    padding: var(--space-5xl) 0;
    position: relative;
}
.section--dark { background-color: var(--black-deep); }
.section--alt { background-color: var(--black-soft); }
.section--gold { background: var(--gold-gradient); }

/* ==========================================================================
   TOP BAR
   ========================================================================== */
.topbar {
    background-color: var(--black-deep);
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
    padding: 8px 0;
    font-size: var(--font-size-sm);
    color: var(--gray-text);
    position: relative;
    z-index: var(--z-header);
}
.topbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.topbar__left {
    display: flex;
    gap: var(--space-lg);
    align-items: center;
}
.topbar__item {
    display: flex;
    align-items: center;
    gap: 6px;
}
.topbar__item i { color: var(--gold-primary); font-size: 14px; }
.topbar__item a { color: var(--gray-text); }
.topbar__item a:hover { color: var(--gold-primary); }
.topbar__right .social-icons { display: flex; gap: 12px; }
.topbar__right .social-icon {
    color: var(--gray-text);
    font-size: 14px;
    transition: color var(--transition-fast);
}
.topbar__right .social-icon:hover { color: var(--gold-primary); }

/* ==========================================================================
   HEADER / NAVIGATION
   ========================================================================== */
.site-header {
    background-color: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: var(--z-header);
    transition: all var(--transition-base);
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}
.site-header.scrolled {
    background-color: rgba(13, 13, 13, 0.98);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}
.header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
}
.header__logo img {
    height: 60px;
    width: auto;
}
.header__logo .site-title {
    font-family: var(--font-heading);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--gold-primary);
    letter-spacing: 1px;
}

/* Primary Nav */
.primary-nav { display: flex; align-items: center; }
.primary-nav .menu {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
}
.primary-nav .menu-item a {
    display: block;
    padding: 10px 18px;
    color: var(--white);
    font-family: var(--font-heading);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    transition: color var(--transition-fast);
}
.primary-nav .menu-item a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--gold-gradient);
    transition: width var(--transition-base);
}
.primary-nav .menu-item a:hover,
.primary-nav .menu-item.current-menu-item a {
    color: var(--gold-primary);
}
.primary-nav .menu-item a:hover::after,
.primary-nav .menu-item.current-menu-item a::after {
    width: 70%;
}

/* Header CTA */
.header__cta .btn {
    font-size: var(--font-size-sm);
    padding: 10px 24px;
}

/* Mobile Menu Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    z-index: calc(var(--z-header) + 10);
}
.mobile-toggle span {
    display: block;
    width: 28px;
    height: 2px;
    background: var(--gold-primary);
    transition: all var(--transition-base);
    border-radius: 2px;
}
.mobile-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.mobile-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile Nav Drawer */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: var(--black-deep);
    z-index: calc(var(--z-header) + 5);
    transition: right var(--transition-base);
    padding: 100px 30px 30px;
    border-left: 1px solid rgba(212, 175, 55, 0.2);
    overflow-y: auto;
}
.mobile-nav.active { right: 0; }
.mobile-nav .menu { flex-direction: column; gap: 0; }
.mobile-nav .menu-item a {
    display: block;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-family: var(--font-heading);
    font-size: var(--font-size-base);
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.mobile-nav .menu-item a:hover { color: var(--gold-primary); }
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: calc(var(--z-header) + 2);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}
.mobile-overlay.active { opacity: 1; visibility: visible; }

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}
.hero__slider {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.hero__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease;
}
.hero__slide.active { opacity: 1; }
.hero__slide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(13,13,13,0.85) 0%, rgba(26,26,26,0.6) 50%, rgba(13,13,13,0.8) 100%);
    z-index: 1;
}
.hero__content {
    position: relative;
    z-index: 2;
    max-width: 700px;
}
.hero__subtitle {
    font-family: var(--font-heading);
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-semibold);
    color: var(--gold-primary);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: 12px;
}
.hero__subtitle::before {
    content: '';
    width: 40px;
    height: 2px;
    background: var(--gold-primary);
}
.hero__title {
    font-family: var(--font-heading);
    font-size: var(--font-size-5xl);
    font-weight: var(--font-weight-black);
    color: var(--white);
    line-height: var(--line-height-tight);
    margin-bottom: var(--space-lg);
}
.hero__title span { color: var(--gold-primary); }
.hero__title .typewriter {
    color: var(--gold-primary);
    border-right: 3px solid var(--gold-primary);
    padding-right: 4px;
    animation: blink-cursor 0.75s step-end infinite;
}
@keyframes blink-cursor {
    from, to { border-color: transparent; }
    50% { border-color: var(--gold-primary); }
}
.hero__description {
    font-size: var(--font-size-lg);
    color: var(--gray-text);
    margin-bottom: var(--space-2xl);
    max-width: 550px;
    line-height: var(--line-height-relaxed);
}
.hero__actions { display: flex; gap: var(--space-md); flex-wrap: wrap; }

/* Hero Dots */
.hero__dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    gap: 10px;
}
.hero__dot {
    width: 12px;
    height: 12px;
    border-radius: var(--radius-full);
    border: 2px solid var(--gold-primary);
    background: transparent;
    cursor: pointer;
    transition: all var(--transition-base);
}
.hero__dot.active {
    background: var(--gold-primary);
    transform: scale(1.2);
}

/* ==========================================================================
   SECTION HEADINGS
   ========================================================================== */
.section-heading {
    margin-bottom: var(--space-3xl);
}
.section-heading--center { text-align: center; }
.section-heading__title {
    font-family: var(--font-heading);
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-bold);
    color: var(--white);
    margin-bottom: var(--space-md);
    text-transform: uppercase;
    letter-spacing: 2px;
}
.section-heading__divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: var(--space-md);
}
.section-heading__divider span {
    width: 60px;
    height: 2px;
    background: var(--gold-gradient);
}
.section-heading__divider i { color: var(--gold-primary); font-size: 18px; }
.section-heading__subtitle {
    font-size: var(--font-size-md);
    color: var(--gray-text);
    max-width: 600px;
    margin: 0 auto;
    line-height: var(--line-height-relaxed);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
    background-color: var(--black-deep);
    border-top: 2px solid rgba(212, 175, 55, 0.15);
}
.footer__main {
    padding: var(--space-4xl) 0 var(--space-2xl);
}
.footer__grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: var(--space-2xl);
}
.footer__col-title {
    font-family: var(--font-heading);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--gold-primary);
    margin-bottom: var(--space-lg);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.footer__about-text {
    color: var(--gray-text);
    font-size: var(--font-size-sm);
    line-height: var(--line-height-relaxed);
    margin-bottom: var(--space-lg);
}
.footer__about .social-icons { margin-top: var(--space-md); }
.footer__about .social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--gold-primary);
    margin-right: 8px;
    transition: all var(--transition-base);
}
.footer__about .social-icon:hover {
    background: var(--gold-primary);
    color: var(--black-deep);
    border-color: var(--gold-primary);
}
.footer__links li {
    margin-bottom: 10px;
}
.footer__links a {
    color: var(--gray-text);
    font-size: var(--font-size-sm);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-fast);
}
.footer__links a::before {
    content: '\f105';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--gold-primary);
    font-size: 12px;
}
.footer__links a:hover { color: var(--gold-primary); padding-left: 5px; }

.footer__contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
    color: var(--gray-text);
    font-size: var(--font-size-sm);
}
.footer__contact-item i {
    color: var(--gold-primary);
    font-size: 16px;
    margin-top: 3px;
    min-width: 20px;
}
.footer__contact-item a { color: var(--gray-text); }
.footer__contact-item a:hover { color: var(--gold-primary); }

.footer__bottom {
    border-top: 1px solid rgba(255,255,255,0.05);
    padding: var(--space-lg) 0;
}
.footer__bottom .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.footer__copyright {
    color: var(--gray-text);
    font-size: var(--font-size-sm);
}
.footer__credit {
    color: var(--gray-medium);
    font-size: var(--font-size-xs);
}
.footer__credit a { color: var(--gold-primary); }

/* ==========================================================================
   FLOATING WHATSAPP BUTTON
   ========================================================================== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: var(--z-whatsapp);
    width: 60px;
    height: 60px;
    border-radius: var(--radius-full);
    background: #25D366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: all var(--transition-base);
    animation: pulse-green 2s infinite;
}
.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.6);
    color: #fff;
}

/* ==========================================================================
   BREADCRUMBS
   ========================================================================== */
.breadcrumbs {
    background: var(--black-soft);
    padding: var(--space-md) 0;
    font-size: var(--font-size-sm);
}
.breadcrumbs a { color: var(--gray-text); }
.breadcrumbs a:hover { color: var(--gold-primary); }
.breadcrumbs__sep {
    margin: 0 10px;
    color: var(--gray-medium);
    font-size: 10px;
}
.breadcrumbs__current { color: var(--gold-primary); }

/* ==========================================================================
   PAGE HEADER (Inner Pages)
   ========================================================================== */
.page-header {
    background: linear-gradient(135deg, var(--black-deep) 0%, var(--black-soft) 100%);
    padding: var(--space-4xl) 0;
    text-align: center;
    position: relative;
    border-bottom: 2px solid rgba(212, 175, 55, 0.15);
}
.page-header__title {
    font-family: var(--font-heading);
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-bold);
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 2px;
}
.page-header__title span { color: var(--gold-primary); }

/* Pagination */
.pagination { margin-top: var(--space-3xl); text-align: center; }
.pagination .nav-links { display: flex; justify-content: center; gap: 8px; }
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border: 1px solid rgba(212,175,55,0.3);
    border-radius: var(--radius-md);
    color: var(--gray-text);
    font-weight: var(--font-weight-semibold);
    transition: all var(--transition-fast);
}
.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    background: var(--gold-primary);
    color: var(--black-deep);
    border-color: var(--gold-primary);
}

/* No Results */
.no-results {
    text-align: center;
    padding: var(--space-5xl) 0;
}
.no-results h2 {
    font-family: var(--font-heading);
    font-size: var(--font-size-3xl);
    color: var(--gold-primary);
    margin-bottom: var(--space-md);
}
.no-results p { color: var(--gray-text); margin-bottom: var(--space-xl); }

/* Posts Grid (index/archive) */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-2xl);
    margin-top: var(--space-2xl);
}
