/**
 * Komal Texfab - Layout CSS
 * Grid, sections, hero, navbar, footer layouts
 */

/* ============================================
   Top Bar
   ============================================ */
.top-bar {
    background: var(--primary);
    padding: 8px 0;
    font-size: var(--fs-xs);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

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

.top-bar-left {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.top-bar-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255,255,255,0.7);
    transition: color var(--transition-fast);
}

.top-bar-item:hover {
    color: var(--accent);
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.top-bar-social {
    color: rgba(255,255,255,0.5);
    transition: color var(--transition-fast);
    display: flex;
}

.top-bar-social:hover {
    color: var(--accent);
}


/* ============================================
   Main Navigation
   ============================================ */
.main-nav {
    background: var(--white);
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.main-nav.scrolled {
    box-shadow: var(--shadow-md);
}

.main-nav.scrolled .nav-inner {
    padding-top: 8px;
    padding-bottom: 8px;
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    transition: padding var(--transition-base);
}

.nav-logo img {
    height: 44px;
    width: auto;
    transition: height var(--transition-base);
}

.main-nav.scrolled .nav-logo img {
    height: 36px;
}

/* Desktop Menu */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 16px;
    font-family: var(--font-heading);
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--gray-700);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    white-space: nowrap;
}

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

.nav-link .dropdown-arrow {
    transition: transform var(--transition-fast);
}

.nav-item:hover .dropdown-arrow {
    transform: rotate(180deg);
}

/* CTA Button in Nav */
.nav-cta {
    background: var(--accent) !important;
    color: var(--white) !important;
    border-radius: var(--radius-sm) !important;
    padding: 10px 24px !important;
}

.nav-cta:hover {
    background: var(--accent-light) !important;
    transform: translateY(-1px);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 260px;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-base);
    z-index: var(--z-dropdown);
    border: 1px solid var(--gray-100);
}

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

.dropdown-menu li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    font-size: var(--fs-sm);
    color: var(--gray-700);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.dropdown-menu li a:hover {
    background: var(--gray-50);
    color: var(--accent);
    padding-left: 22px;
}

.dd-icon {
    font-size: 16px;
}

.dropdown-menu li a svg {
    opacity: 0.4;
}

/* Mobile Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    z-index: 10;
}

.hamburger-line {
    width: 24px;
    height: 2px;
    background: var(--gray-800);
    border-radius: 2px;
    transition: all var(--transition-base);
    transform-origin: center;
}

.nav-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.nav-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}


/* ============================================
   Hero Slider
   ============================================ */
.hero-section {
    position: relative;
    height: 100vh;
    min-height: 600px;
    max-height: 1000px;
    overflow: hidden;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease;
    z-index: 0;
}

.hero-slide.active {
    opacity: 1;
    z-index: 1;
}

.hero-slide-bg {
    position: absolute;
    inset: 0;
}

.hero-slide-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(10,22,40,0.85) 0%, rgba(10,22,40,0.5) 100%);
}

.hero-slide-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 var(--container-padding);
    z-index: 2;
}

.hero-label {
    display: inline-block;
    padding: 8px 24px;
    background: rgba(var(--accent-rgb), 0.15);
    border: 1px solid rgba(var(--accent-rgb), 0.3);
    border-radius: 50px;
    font-family: var(--font-heading);
    font-size: var(--fs-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent);
    margin-bottom: var(--space-lg);
    backdrop-filter: blur(8px);
}

.hero-title {
    color: var(--white);
    font-size: var(--fs-hero);
    max-width: 900px;
    margin-bottom: var(--space-lg);
    line-height: 1.1;
}

.hero-title span {
    color: var(--accent);
}

.hero-subtitle {
    color: rgba(255,255,255,0.8);
    font-size: var(--fs-xl);
    max-width: 700px;
    margin-bottom: var(--space-2xl);
    line-height: 1.6;
    font-weight: 300;
}

.hero-buttons {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
    justify-content: center;
}

/* Hero Slider Controls */
.hero-dots {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 5;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border-radius: var(--radius-full);
    background: rgba(255,255,255,0.3);
    cursor: pointer;
    transition: all var(--transition-base);
    border: 2px solid transparent;
}

.hero-dot.active {
    background: var(--accent);
    border-color: var(--accent);
    transform: scale(1.2);
}

.hero-dot:hover {
    background: rgba(255,255,255,0.6);
}

/* Scroll Indicator */
.hero-scroll-indicator {
    position: absolute;
    bottom: 40px;
    right: 40px;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.5);
    font-size: var(--fs-xs);
    font-family: var(--font-heading);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.scroll-line {
    width: 1px;
    height: 50px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    animation: scrollLine 2s ease infinite;
}

@keyframes scrollLine {
    0%, 100% { transform: scaleY(0); transform-origin: top; }
    50% { transform: scaleY(1); transform-origin: top; }
    51% { transform-origin: bottom; }
    100% { transform: scaleY(0); transform-origin: bottom; }
}


/* ============================================
   Footer Layout
   ============================================ */
.footer-wave {
    margin-top: -1px;
}

.footer-wave svg {
    display: block;
    width: 100%;
    height: 80px;
}

.footer-main {
    background: var(--primary);
    padding: var(--space-4xl) 0 var(--space-2xl);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.8fr 0.8fr 1.1fr;
    gap: var(--space-2xl);
}

.footer-logo {
    margin-bottom: var(--space-lg);
}

.footer-logo img {
    height: 40px;
    width: auto;
    filter: brightness(0) invert(1);
}

.footer-about {
    color: rgba(255,255,255,0.6);
    font-size: var(--fs-sm);
    line-height: 1.8;
    margin-bottom: var(--space-md);
}

.footer-read-more {
    font-family: var(--font-heading);
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--accent);
    transition: color var(--transition-fast);
}

.footer-read-more:hover {
    color: var(--accent-light);
}

.footer-heading {
    color: var(--white);
    font-size: var(--fs-md);
    font-weight: 600;
    margin-bottom: var(--space-xl);
    position: relative;
    padding-bottom: var(--space-md);
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255,255,255,0.6);
    font-size: var(--fs-sm);
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.footer-links a::before {
    content: '→';
    opacity: 0;
    transform: translateX(-8px);
    transition: all var(--transition-fast);
    font-size: 12px;
    color: var(--accent);
}

.footer-links a:hover {
    color: var(--accent);
    padding-left: 4px;
}

.footer-links a:hover::before {
    opacity: 1;
    transform: translateX(0);
}

.footer-contact-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.footer-contact-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.footer-contact-item svg {
    flex-shrink: 0;
    margin-top: 3px;
}

.footer-contact-item span,
.footer-contact-item a {
    color: rgba(255,255,255,0.6);
    font-size: var(--fs-sm);
    line-height: 1.6;
    transition: color var(--transition-fast);
}

.footer-contact-item a:hover {
    color: var(--accent);
}

.footer-social {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-xl);
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.6);
    transition: all var(--transition-base);
}

.social-link:hover {
    background: var(--accent);
    color: var(--white);
    transform: translateY(-3px);
}

.footer-bottom {
    background: rgba(0,0,0,0.2);
    padding: var(--space-lg) 0;
    border-top: 1px solid rgba(255,255,255,0.05);
}

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

.footer-bottom p {
    color: rgba(255,255,255,0.4);
    font-size: var(--fs-xs);
    margin-bottom: 0;
}

.footer-bottom-links {
    display: flex;
    gap: var(--space-xl);
}

.footer-bottom-links a {
    color: rgba(255,255,255,0.4);
    font-size: var(--fs-xs);
    transition: color var(--transition-fast);
}

.footer-bottom-links a:hover {
    color: var(--accent);
}


/* ============================================
   Two Column Layout
   ============================================ */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
}

.two-col-text {
    max-width: 560px;
}

.two-col-img {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.two-col-img img {
    width: 100%;
    height: auto;
    display: block;
}

/* Accent border decorator */
.two-col-img::after {
    content: '';
    position: absolute;
    bottom: -16px;
    right: -16px;
    width: 60%;
    height: 60%;
    border: 3px solid var(--accent);
    border-radius: var(--radius-lg);
    z-index: -1;
}


/* ============================================
   Stats Bar
   ============================================ */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
    padding: var(--space-3xl) 0;
}

.stats-bar .stat-card {
    position: relative;
}

.stats-bar .stat-card:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 20%;
    height: 60%;
    width: 1px;
    background: rgba(255,255,255,0.1);
}


/* ============================================
   Map Section
   ============================================ */
.map-section {
    position: relative;
}

.map-container {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    aspect-ratio: 21/9;
}

.map-container iframe,
.map-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none;
}


/* ============================================
   Content Sections for Inner Pages
   ============================================ */
.content-section {
    padding: var(--space-section) 0;
}

.content-section p {
    font-size: var(--fs-md);
    line-height: 1.9;
    color: var(--gray-700);
    margin-bottom: var(--space-lg);
}

.content-section h3 {
    margin-bottom: var(--space-lg);
    margin-top: var(--space-2xl);
}

.content-section ul {
    margin-bottom: var(--space-lg);
}

.content-section ul li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 12px;
    color: var(--gray-700);
    font-size: var(--fs-md);
    line-height: 1.7;
}

.content-section ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
}


/* ============================================
   Feature Grid  (Values, Policies etc.)
   ============================================ */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

.feature-grid .icon-card {
    text-align: left;
}

.feature-grid .icon-card .icon-wrap {
    margin: 0 0 var(--space-lg) 0;
}
