/* INTERA - Industrial Electrical Panel Solutions */
/* Modern, Professional & Industrial Design */

/* CSS Variables - Industrial Color Palette */
:root {
    /* Primary Colors - Industrial Blue */
    --primary-color: #1e40af;
    --primary-light: #3b82f6;
    --primary-dark: #1e3a8a;
    --primary-gradient: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    
    /* Secondary Colors - Industrial Grey */
    --secondary-color: #64748b;
    --secondary-light: #94a3b8;
    --secondary-dark: #475569;
    
    /* Accent Colors */
    --accent-orange: #f97316;
    --accent-green: #16a34a;
    --accent-red: #dc2626;
    
    /* Neutral Colors */
    --white: #ffffff;
    --light-grey: #f8fafc;
    --medium-grey: #e2e8f0;
    --dark-grey: #334155;
    --black: #0f172a;
    
    /* Industrial Specific */
    --steel-blue: #475569;
    --industrial-orange: #ea580c;
    --electric-blue: #2563eb;
    
    /* Typography */
    --font-family-primary: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-family-secondary: 'Roboto', sans-serif;
    
    /* Spacing */
    --section-padding: 5rem 0;
    --container-padding: 1.5rem;
    
    /* Border Radius */
    --border-radius-sm: 0.375rem;
    --border-radius: 0.5rem;
    --border-radius-lg: 1rem;
    --border-radius-xl: 1.5rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 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);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Transitions */
    --transition-fast: 0.15s ease-in-out;
    --transition-normal: 0.3s ease-in-out;
    --transition-slow: 0.5s ease-in-out;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden; /* Prevent horizontal scroll globally */
}

body {
    font-family: var(--font-family-primary);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--dark-grey);
    background-color: var(--primary-color);
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* Remove body padding-top since we're using floating navbar */
body.has-floating-navbar {
    padding-top: 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--black);
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.125rem; }

p {
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.lead {
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.7;
    color: var(--secondary-dark);
}

/* Links */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-normal);
}

a:hover {
    color: var(--primary-dark);
}

/* Hero Section - Full Screen Industrial Design */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: linear-gradient(135deg, var(--black) 0%, var(--steel-blue) 50%, var(--primary-dark) 100%);
    overflow: hidden;
    padding-top: 100px; /* Space for floating navbar */
}

@media (max-width: 991.98px) {
    .hero-section {
        min-height: calc(100vh - 90px);
        padding-top: 120px; /* More space for mobile navbar */
    }
}

@media (max-width: 576px) {
    .hero-section {
        min-height: calc(100vh - 80px);
        padding-top: 110px; /* Adjusted for mobile */
    }
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 40%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(249, 115, 22, 0.1) 0%, transparent 50%),
        linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
    z-index: 1;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><pattern id="circuit" patternUnits="userSpaceOnUse" width="100" height="100"><path d="M20,20 L80,20 L80,80 L20,80 Z" fill="none" stroke="rgba(59,130,246,0.1)" stroke-width="1"/><circle cx="20" cy="20" r="3" fill="rgba(59,130,246,0.2)"/><circle cx="80" cy="80" r="3" fill="rgba(249,115,22,0.2)"/></pattern></defs><rect width="100%" height="100%" fill="url(%23circuit)"/></svg>') no-repeat center right;
    background-size: cover;
    opacity: 0.4;
    z-index: 1;
}

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

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    margin-top: 3rem;
}

.hero-stat {
    text-align: center;
    color: var(--white);
}

.hero-stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent-orange);
    display: block;
}

.hero-stat-label {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

/* Hero Buttons */
.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn {
    font-family: var(--font-family-primary);
    font-weight: 600;
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition-normal);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.875rem;
}

.btn-primary {
    background: var(--primary-gradient);
    color: var(--white);
    box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    filter: brightness(1.1);
}

.btn-outline-light {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--white);
    transform: translateY(-2px);
}

/* About Section */
.about-section {
    padding: var(--section-padding);
    background: var(--white);
}

.about-content {
    max-width: 800px;
}

.about-text {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--secondary-color);
    margin-bottom: 2rem;
}

.about-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.about-highlight {
    padding: 1.5rem;
    background: var(--light-grey);
    border-radius: var(--border-radius-lg);
    border-left: 4px solid var(--primary-color);
}

.about-highlight-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: var(--white);
    font-size: 1.5rem;
}

.about-highlight h4 {
    color: var(--black);
    margin-bottom: 0.5rem;
}

.about-highlight p {
    color: var(--secondary-color);
    margin: 0;
    font-size: 0.95rem;
}

/* Services Section */
.services-section {
    padding: var(--section-padding);
    background: linear-gradient(135deg, var(--light-grey) 0%, var(--white) 100%);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow);
    border: 1px solid var(--medium-grey);
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-gradient);
}

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

.service-icon {
    width: 70px;
    height: 70px;
    background: var(--primary-gradient);
    border-radius: var(--border-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--white);
    font-size: 2rem;
}

.service-card h3 {
    color: var(--black);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.service-card p {
    color: var(--secondary-color);
    line-height: 1.7;
}

/* Features Section */
.features-section {
    padding: var(--section-padding);
    background: var(--black);
    color: var(--white);
    position: relative;
}

.features-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(249, 115, 22, 0.1) 0%, transparent 50%);
    z-index: 1;
}

.features-content {
    position: relative;
    z-index: 2;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-item {
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: var(--transition-normal);
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--accent-orange);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--white);
    font-size: 1.5rem;
}

.feature-item h4 {
    color: var(--white);
    margin-bottom: 1rem;
}

.feature-item p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

/* Stats Section */
.stats-section {
    padding: var(--section-padding);
    background: var(--primary-gradient);
    color: var(--white);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
    padding: 2rem 1rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--white);
    display: block;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.125rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}

/* CTA Section */
.cta-section {
    padding: var(--section-padding);
    background: linear-gradient(135deg, var(--steel-blue) 0%, var(--black) 100%);
    text-align: center;
    color: var(--white);
}

.cta-content {
    max-width: 700px;
    margin: 0 auto;
}

.cta-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--white);
}

.cta-text {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    
    .cta-buttons .btn {
        width: 100%;
        max-width: 280px;
    }
}

@media (max-width: 480px) {
    .cta-buttons .btn {
        max-width: 260px;
        font-size: 0.875rem;
    }
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-subtitle {
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--black);
    margin-bottom: 1rem;
}

.section-description {
    font-size: 1.125rem;
    color: var(--secondary-color);
    max-width: 600px;
    margin: 0 auto;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.75rem;
}

.col, .col-md-4, .col-md-6, .col-lg-6, .col-lg-12 {
    padding: 0 0.75rem;
}

.col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-md-6 { flex: 0 0 50%; max-width: 50%; }
.col-lg-6 { flex: 0 0 50%; max-width: 50%; }
.col-lg-12 { flex: 0 0 100%; max-width: 100%; }

.text-center { text-align: center; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }
.py-5 { padding: 3rem 0; }

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .hero-stats {
        gap: 2rem;
    }
    
    .services-grid,
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 3rem 0;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
        margin-top: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
        padding: 0.875rem 1.5rem;
    }
    
    .services-grid,
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .about-highlights {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .col-md-4,
    .col-md-6,
    .col-lg-6 {
        flex: 0 0 100%;
        max-width: 100%;
        
    }
    
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.75rem; }
    
    .section-title {
        font-size: 2rem;
    }
    
    .cta-title {
        font-size: 2rem;
    }
    
    .cta-text {
        font-size: 1.125rem;
        padding: 0 10px;
    }
    
    /* Additional mobile hero fixes */
    .hero-content {
        text-align: center;
        padding: 0 10px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
        line-height: 1.3;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .service-card,
    .feature-item {
        padding: 1.5rem;
        margin-top: 1rem;
    }
    
    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.8125rem;
        max-width: 260px;
    }
    
    /* Ensure extra small screens don't have overflow */
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .hero-content {
        padding: 0 5px;
    }
    
    .hero-stats {
        margin-top: 1.5rem;
    }
    
    .hero-stat-number {
        font-size: 2rem;
    }
}

/* Animation Classes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.fade-in-left {
    animation: fadeInLeft 0.8s ease-out;
}

.fade-in-right {
    animation: fadeInRight 0.8s ease-out;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Focus States for Accessibility */
.btn:focus,
a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Override main-content styles for homepage */
.main-content.homepage {
    background: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    position: static !important;
}

.main-content.homepage::before {
    display: none !important;
}

/* Ensure full width sections on homepage - Desktop only */
@media (min-width: 992px) {
    .homepage .hero-section,
    .homepage .about-section,
    .homepage .services-section,
    .homepage .features-section,
    .homepage .stats-section,
    .homepage .cta-section {
        width: 100vw;
        margin-left: calc(-50vw + 50%);
        position: relative;
    }
}

/* Mobile: Keep sections within viewport and prevent horizontal scroll */
@media (max-width: 991.98px) {
    .homepage .hero-section,
    .homepage .about-section,
    .homepage .services-section,
    .homepage .features-section,
    .homepage .stats-section,
    .homepage .cta-section {
        width: 100%;
        margin-left: 0;
        position: relative;
        overflow-x: hidden;
    }
    
    /* Ensure containers don't overflow */
    .homepage .container {
        max-width: 100%;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Fix row negative margins causing overflow */
    .homepage .row {
        margin-left: 0;
        margin-right: 0;
    }
    
    /* Adjust column padding */
    .homepage .col,
    .homepage .col-md-4,
    .homepage .col-md-6,
    .homepage .col-lg-6,
    .homepage .col-lg-12 {
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-gradient);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
    filter: brightness(1.1);
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}

/* RTL Support */
[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] .navbar-brand {
    margin-right: 0;
    margin-left: auto;
}

[dir="rtl"] .navbar-nav {
    margin-right: 0;
    margin-left: auto;
}

[dir="rtl"] .dropdown-menu {
    right: 0;
    left: auto;
}

[dir="rtl"] .hero-buttons {
    flex-direction: row-reverse;
}

[dir="rtl"] .hero-stats {
    flex-direction: row-reverse;
}

[dir="rtl"] .about-highlight {
    border-left: none;
    border-right: 4px solid var(--primary-color);
}

[dir="rtl"] .about-highlight-icon,
[dir="rtl"] .service-icon,
[dir="rtl"] .feature-icon {
    margin-left: 0;
    margin-right: 0;
}

[dir="rtl"] .nav-link i {
    margin-left: 6px;
    margin-right: 0;
}

[dir="rtl"] .dropdown-item i {
    margin-left: 8px;
    margin-right: 0;
}

[dir="rtl"] .dropdown-item img {
    margin-left: 8px;
    margin-right: 0;
}

[dir="rtl"] .brand-logo {
    margin-left: 12px;
    margin-right: 0;
}

[dir="rtl"] .floating-navbar .navbar-toggler {
    margin-left: 0;
    margin-right: auto;
}

[dir="rtl"] .back-to-top {
    right: auto;
    left: 30px;
}

@media (max-width: 768px) {
    [dir="rtl"] .back-to-top {
        left: 20px;
    }
    
    [dir="rtl"] .hero-buttons,
    [dir="rtl"] .hero-stats {
        flex-direction: column;
    }
}

/* Print Styles */
@media print {
    .hero-section,
    .cta-section {
        background: none !important;
        color: var(--black) !important;
    }
    
    .btn {
        border: 1px solid var(--black) !important;
        background: none !important;
        color: var(--black) !important;
    }
    
    .back-to-top {
        display: none !important;
    }
}