/* ==========================================================================
   Raj Electronics - Global Stylesheet
   ========================================================================== */

/* --- Google Fonts Integration --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* --- Design Tokens & CSS Variables --- */
:root {
    --primary: #2563EB;
    --secondary: #0EA5E9;
    --accent: #F59E0B;
    --bg-main: #FFFFFF;
    --bg-surface: #F8FAFC;
    --text-dark: #1E293B;
    --text-muted: #64748B;
    --border-color: #E2E8F0;
    
    --font-sans: 'Poppins', sans-serif;
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --max-width: 1200px;
}

/* --- Base Reset --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-main);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- Layout Architecture --- */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

section {
    padding: 5rem 0;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    color: var(--text-dark);
}

.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 4px;
    background-color: var(--primary);
    margin: 0.75rem auto 0;
    border-radius: var(--radius-sm);
}

/* --- Navigation System --- */
.header-navbar {
    position: sticky;
    top: 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition-smooth);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4.5rem;
}

.logo-block {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--primary);
}

.logo-sub {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-top: -4px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    padding: 0.5rem 0;
    position: relative;
}

.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-smooth);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.hamburger-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    padding: 0.5rem;
}

.hamburger-bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-dark);
    border-radius: 2px;
    transition: var(--transition-smooth);
}

/* --- Button Framework --- */
.btn-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 2rem;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: var(--transition-smooth);
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--bg-main);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background-color: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: transparent;
    border-color: var(--primary);
    color: var(--primary);
}

.btn-secondary:hover {
    background-color: rgba(37, 99, 235, 0.05);
    transform: translateY(-2px);
}

/* --- Hero & Intro Modules --- */
.hero-wrapper {
    background: radial-gradient(circle at top right, rgba(14, 165, 233, 0.1), transparent), linear-gradient(to bottom, var(--bg-surface), var(--bg-main));
    text-align: center;
    padding: 7rem 0;
}

.hero-main-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    font-weight: 300;
}

/* --- Feature / Value Grid --- */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background-color: var(--bg-main);
    padding: 2.5rem 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition-smooth);
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.feature-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* --- Banner Split Component --- */
.banner-cta {
    background-color: var(--text-dark);
    color: var(--bg-main);
    text-align: center;
    border-radius: var(--radius-lg);
    padding: 4rem 2rem;
}

.banner-cta h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.banner-cta p {
    color: #94a3b8;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Gallery Implementation --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 4 / 3;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(30, 41, 59, 0.9), rgba(30, 41, 59, 0.2));
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    opacity: 0;
    transition: var(--transition-smooth);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-tag {
    color: var(--secondary);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.gallery-title {
    color: var(--bg-main);
    font-size: 1.1rem;
    font-weight: 500;
    margin-top: 0.25rem;
}

/* --- Lightbox Structural Layer --- */
.lightbox-modal {
    position: fixed;
    inset: 0;
    background-color: rgba(15, 23, 42, 0.95);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-modal.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 80vh;
    position: relative;
}

.lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
}

.lightbox-caption {
    color: var(--bg-main);
    text-align: center;
    margin-top: 1rem;
    font-size: 1.1rem;
}

.lightbox-close {
    position: absolute;
    top: -2.5rem;
    right: 0;
    background: none;
    border: none;
    color: var(--bg-main);
    font-size: 2rem;
    cursor: pointer;
}

/* --- Form Architecture --- */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.info-pane h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.contact-meta-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.contact-meta-item {
    display: flex;
    gap: 1rem;
}

.meta-icon {
    font-size: 1.25rem;
    color: var(--primary);
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.meta-text strong {
    display: block;
    color: var(--text-dark);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.meta-text p {
    color: var(--text-muted);
}

.map-embed {
    width: 100%;
    height: 300px;
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.form-card {
    background-color: var(--bg-surface);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    border: 1px solid var(--border-color);
    background-color: var(--bg-main);
    border-radius: var(--radius-md);
    transition: var(--transition-smooth);
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* --- Prose Architecture --- */
.prose-block {
    max-width: 800px;
    margin: 0 auto;
}

.prose-block h2 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
    color: var(--text-dark);
}

.prose-block p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    text-align: justify;
}

.prose-block ul {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

/* --- Utilities & Utilities Elements --- */
.back-top-trigger {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: var(--primary);
    color: var(--bg-main);
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
    z-index: 999;
}

.back-top-trigger.visible {
    opacity: 1;
    visibility: visible;
}

.back-top-trigger:hover {
    background-color: #1d4ed8;
    transform: translateY(-3px);
}

/* --- Universal Footer Architecture --- */
.footer-wrap {
    background-color: var(--text-dark);
    color: var(--bg-main);
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 2fr;
    gap: 3rem;
    border-bottom: 1px solid #334155;
    padding-bottom: 3rem;
    margin-bottom: 2rem;
}

.footer-brand h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.footer-brand p {
    color: #94a3b8;
    max-width: 320px;
}

.footer-nav h4, .footer-contact h4 {
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
    position: relative;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.footer-links a:hover {
    color: var(--secondary);
    padding-left: 4px;
}

.footer-contact-items {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    color: #94a3b8;
}

.footer-copyright {
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 992px) {
    .hero-main-title { font-size: 2.75rem; }
    .contact-layout { grid-template-columns: 1fr; gap: 4rem; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
    .footer-brand { grid-column: span 2; }
}

@media (max-width: 768px) {
    section { padding: 3.5rem 0; }
    .hamburger-btn { display: flex; }
    
    .nav-menu {
        position: fixed;
        top: 4.5rem;
        left: -100%;
        width: 100%;
        height: calc(100vh - 4.5rem);
        background-color: var(--bg-main);
        flex-direction: column;
        align-items: center;
        padding-top: 3rem;
        gap: 2.5rem;
        transition: var(--transition-smooth);
        box-shadow: var(--shadow-md);
    }
    
    .nav-menu.active {
        left: 0;
    }

    .hamburger-btn.active .hamburger-bar:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    
    .hamburger-btn.active .hamburger-bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger-btn.active .hamburger-bar:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    .footer-grid { grid-template-columns: 1fr; }
    .footer-brand { grid-column: span 1; }
}