/* ====================================================
   BRUNTAB ENTERPRISE DESIGN SYSTEM
   ==================================================== */

:root {
    /* Brand Colors */
    --bruntab-red: #F20000;
    --bruntab-blue: #00378B;
    --bruntab-warm-grey: #AAA096;
    
    /* Semantic Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-dark: #1a1e2d;
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --text-light: #e2e8f0;
    
    /* Typography */
    --font-fa: 'Vazirmatn', Tahoma, sans-serif;
    --font-en: 'Inter', Roboto, sans-serif;
    
    /* Effects & Transitions */
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 25px 35px -5px rgba(0, 55, 139, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --radius: 8px;
    --radius-lg: 16px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography switching based on lang */
body.lang-fa {
    font-family: var(--font-fa);
}

body.lang-en {
    font-family: var(--font-en);
}

a {
    color: var(--bruntab-blue);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--bruntab-red);
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ====================================================
   BUTTONS
   ==================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--bruntab-blue);
    color: white;
}

.btn-primary:hover {
    background-color: var(--bruntab-red);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(242, 0, 0, 0.2);
}

.btn-secondary {
    background-color: var(--bruntab-warm-grey);
    color: white;
}

.btn-secondary.outline {
    background-color: transparent;
    border-color: white;
    color: white;
}

.btn-secondary.outline:hover {
    background-color: white;
    color: var(--bruntab-blue);
}

.btn-light {
    background-color: white;
    color: var(--bruntab-blue);
}

.btn-light:hover {
    background-color: var(--bg-secondary);
}

.btn-link {
    color: var(--bruntab-red);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-link:hover {
    color: var(--bruntab-blue);
    transform: translateX(calc(-1 * 5px)); /* RTL logic, will need adjustments */
}
html[dir="ltr"] .btn-link:hover {
    transform: translateX(5px);
}

/* ====================================================
   HEADER & NAVIGATION
   ==================================================== */
.top-bar {
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-size: 0.85rem;
    padding: 8px 0;
}

.top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-info {
    display: flex;
    gap: 20px;
}

.contact-item {
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 6px;
}

.lang-switcher a {
    color: var(--bruntab-warm-grey);
}
.lang-switcher a.active, .lang-switcher a:hover {
    color: white;
}
.lang-switcher .separator {
    margin: 0 8px;
    color: var(--bruntab-warm-grey);
}

.main-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo img {
    height: 40px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-menu > li > a {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 10px 0;
    position: relative;
}

.nav-menu > li > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--bruntab-blue);
    transition: var(--transition);
}

.nav-menu > li > a:hover::after {
    width: 100%;
}

.has-dropdown {
    position: relative;
}

.caret {
    font-size: 0.7rem;
    margin-inline-start: 4px;
    transition: var(--transition);
}

.dropdown {
    position: absolute;
    top: 100%;
    inset-inline-start: 0;
    min-width: 260px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    padding: 10px 0;
    z-index: 100;
    border-top: 3px solid var(--bruntab-blue);
}

.mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100vw;
    background: white;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 100;
    border-top: 3px solid var(--bruntab-blue);
    padding: 0;
}

.mega-menu-item {
    position: static;
}

.mega-menu-inner {
    display: flex;
    justify-content: space-between;
    padding: 40px 20px;
    gap: 30px;
}

.mega-col {
    flex: 1;
}

.mega-col h4 {
    color: var(--bruntab-red);
    margin-bottom: 20px;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--bg-secondary);
    padding-bottom: 10px;
}

.mega-col ul li a {
    display: block;
    padding: 8px 0;
    color: var(--text-secondary);
    transition: var(--transition);
}

.mega-col ul li a:hover {
    color: var(--bruntab-blue);
    padding-inline-start: 10px;
}

.has-dropdown:hover > .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown:not(.mega-menu) li a {
    display: block;
    padding: 10px 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-bottom: 1px solid var(--bg-secondary);
}

.dropdown:not(.mega-menu) li:last-child a {
    border-bottom: none;
}

.dropdown:not(.mega-menu) li a:hover {
    background-color: var(--bg-secondary);
    color: var(--bruntab-red);
    padding-inline-start: 25px;
}

/* Sub-dropdowns */
.has-sub-dropdown {
    position: relative;
}
.sub-dropdown {
    position: absolute;
    top: 0;
    inset-inline-start: 100%;
    min-width: 240px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px);
    transition: var(--transition);
    border-top: 3px solid var(--bruntab-red);
}
.has-sub-dropdown:hover > .sub-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}
.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--bruntab-blue);
    transition: var(--transition);
}

/* ====================================================
   TYPOGRAPHY & SECTIONS
   ==================================================== */
section {
    padding: 80px 0;
}

.section-header {
    margin-bottom: 50px;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--bruntab-blue);
    margin-bottom: 10px;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.brand-text {
    color: var(--bruntab-red);
}

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

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

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

.divider {
    display: inline-flex;
    align-items: center;
    margin-top: 15px;
}

.line {
    height: 3px;
    display: block;
    border-radius: 3px;
}

.red-line {
    width: 30px;
    background-color: var(--bruntab-red);
    margin-inline-end: 5px;
}

.blue-line {
    width: 60px;
    background-color: var(--bruntab-blue);
}

/* ====================================================
   HERO SECTION
   ==================================================== */
.hero-section {
    padding: 0;
    height: calc(100vh - 120px);
    min-height: 600px;
    position: relative;
    background-color: var(--bg-dark);
}

.hero-slider {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease-in-out, transform 8s linear;
    transform: scale(1);
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1.05); /* Ken Burns effect */
    z-index: 1;
}

.slider-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 50px;
    transform: translateY(-50%);
    z-index: 10;
}

.slider-prev, .slider-next {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-prev:hover, .slider-next:hover {
    background: var(--bruntab-blue);
}

.slider-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background: var(--bruntab-red);
    width: 24px;
    border-radius: 6px;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0, 55, 139, 0.9), rgba(0, 55, 139, 0.4));
    z-index: 1;
}

html[dir="rtl"] .hero-overlay {
    background: linear-gradient(to left, rgba(0, 55, 139, 0.9), rgba(0, 55, 139, 0.4));
}

.hero-content {
    position: relative;
    z-index: 2;
    color: white;
}

.hero-text {
    max-width: 600px;
    animation: slideUp 1s ease-out forwards;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-text h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
    font-weight: 800;
}

.hero-text .highlight {
    color: var(--bruntab-red);
}

.hero-desc {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

.hero-actions {
    display: flex;
    gap: 15px;
}

/* ====================================================
   CORE SERVICES
   ==================================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.service-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.05);
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.card-img-wrapper {
    height: 250px;
    overflow: hidden;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.service-card:hover .card-img-wrapper img {
    transform: scale(1.05);
}

.card-content {
    padding: 30px;
    position: relative;
}

.icon-box {
    width: 60px;
    height: 60px;
    background: var(--bg-primary);
    border: 2px solid var(--bruntab-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    position: absolute;
    top: -30px;
    inset-inline-end: 30px;
    box-shadow: var(--shadow-sm);
    color: var(--bruntab-blue);
}

.card-content h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
    color: var(--bruntab-blue);
}

.card-content p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* ====================================================
   SEGMENTS
   ==================================================== */
.segments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.segment-card {
    background: white;
    padding: 30px 20px;
    text-align: center;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border-bottom: 3px solid transparent;
}

.segment-card:hover {
    border-bottom-color: var(--bruntab-red);
    transform: translateY(-5px);
}

.segment-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.segment-card h4 {
    font-size: 1.1rem;
    color: var(--bruntab-blue);
}

/* ====================================================
   WHY BRUNTAB
   ==================================================== */
.split-layout {
    display: flex;
    align-items: center;
    gap: 60px;
}

.split-layout > div {
    flex: 1;
}

.benefit-list {
    margin-top: 30px;
}

.benefit-list li {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

.check-icon {
    width: 30px;
    height: 30px;
    min-width: 30px;
    background: rgba(0, 55, 139, 0.1);
    color: var(--bruntab-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
}

.benefit-list strong {
    display: block;
    font-size: 1.1rem;
    color: var(--bruntab-blue);
    margin-bottom: 5px;
}

.benefit-list p {
    color: var(--text-secondary);
}

.trust-badge-container {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.dashboard-preview {
    width: 100%;
    display: block;
}

.trust-badge {
    position: absolute;
    bottom: 20px;
    inset-inline-start: 20px;
    background: var(--bg-dark);
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: bold;
    border-inline-start: 4px solid var(--bruntab-red);
}

/* ====================================================
   PROJECTS
   ==================================================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.placeholder-img {
    height: 200px;
    background: var(--bg-dark) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 24 24" fill="none" stroke="%23AAA096" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><circle cx="8.5" cy="8.5" r="1.5"></circle><polyline points="21 15 16 10 5 21"></polyline></svg>') no-repeat center;
    opacity: 0.8;
}

.project-info {
    padding: 20px;
    text-align: start;
}

.project-info h4 {
    color: var(--bruntab-blue);
    margin-bottom: 5px;
}

.project-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ====================================================
   EV INFRASTRUCTURE
   ==================================================== */
.ev-infrastructure-section {
    padding: 0;
}

.ev-banner {
    background: linear-gradient(135deg, var(--bruntab-blue), #002255);
    border-radius: var(--radius-lg);
    padding: 60px;
    color: white;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Abstract EV background element */
.ev-banner::after {
    content: '';
    position: absolute;
    top: -50%;
    inset-inline-end: -10%;
    width: 50%;
    height: 200%;
    background: rgba(255,255,255,0.05);
    transform: rotate(30deg);
}

.ev-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
}

.badge {
    display: inline-block;
    background: var(--bruntab-red);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 15px;
}

.ev-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.ev-content p {
    margin-bottom: 30px;
    font-size: 1.1rem;
    opacity: 0.9;
}

/* ====================================================
   BLOG
   ==================================================== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.blog-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.blog-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
}

.blog-img {
    height: 180px;
    background-color: var(--bg-dark);
}

.blog-content {
    padding: 25px;
    text-align: start;
}

.blog-content h5 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 15px;
    line-height: 1.4;
}

.read-more {
    font-size: 0.9rem;
    font-weight: 600;
}

/* ====================================================
   CTA SECTION
   ==================================================== */
.cta-section {
    background-color: var(--bg-primary);
}

.cta-section h2 {
    font-size: 2.5rem;
    color: var(--bruntab-blue);
    margin-bottom: 20px;
}

.cta-section p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

/* ====================================================
   FOOTER
   ==================================================== */
.main-footer {
    background-color: var(--bg-dark);
    color: var(--text-light);
    padding-top: 60px;
}

.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}

.footer-logo {
    height: 45px;
    margin-bottom: 20px;
    filter: brightness(0) invert(1);
}

.about-col p {
    opacity: 0.7;
    max-width: 300px;
}

.footer-col h3 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.2rem;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    inset-inline-start: 0;
    width: 30px;
    height: 2px;
    background-color: var(--bruntab-red);
}

.links-col ul li {
    margin-bottom: 12px;
}

.links-col a {
    color: var(--text-light);
    opacity: 0.7;
}

.links-col a:hover {
    opacity: 1;
    color: var(--bruntab-red);
    padding-inline-start: 5px;
}

.contact-col p {
    margin-bottom: 15px;
    opacity: 0.8;
}

.footer-bottom {
    background-color: #11141d;
    padding: 20px 0;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.6;
}

/* ====================================================
   RESPONSIVE DESIGN
   ==================================================== */
@media (max-width: 992px) {
    .nav-menu {
        display: none;
    }
    .mobile-menu-toggle {
        display: flex;
    }
    .split-layout {
        flex-direction: column;
    }
    .footer-inner {
        grid-template-columns: 1fr;
    }
    .hero-text h1 {
        font-size: 2.5rem;
    }
    .ev-banner {
        padding: 40px 20px;
    }
}
