/* ===================================
   Nfinnerty Electrical - Custom Styles
   Modern Bootstrap 5 Website
   =================================== */

/* Base Styles */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --warning-color: #ffc107;
    --dark-color: #212529;
    --light-bg: #f8f9fa;
}

body {
    font-family: "Segoe UI", "Trebuchet MS", "Gill Sans", "Franklin Gothic Medium", sans-serif;
    line-height: 1.7;
    color: #ffffff;
    background-color: #1a1a2e;
}

/* Lightweight layout and utility layer for pages that do not load Bootstrap */
* {
    box-sizing: border-box;
}

a {
    color: inherit;
}

.container {
    width: min(100% - 2rem, 1140px);
    margin-inline: auto;
}

.row {
    display: flex;
    flex-wrap: wrap;
}

.row > * {
    width: 100%;
}

.g-4 {
    margin: -0.75rem;
}

.g-4 > * {
    padding: 0.75rem;
}

.g-3 {
    margin: -0.5rem;
}

.g-3 > * {
    padding: 0.5rem;
}

.d-flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.flex-column { flex-direction: column; }
.align-items-center { align-items: center; }
.justify-content-center { justify-content: center; }
.text-center { text-align: center; }
.text-white { color: #fff; }
.text-warning { color: var(--warning-color); }
.text-uppercase { text-transform: uppercase; }
.fw-bold { font-weight: 700; }
.fw-semibold { font-weight: 600; }
.lead { font-size: 1.25rem; }
.h-100 { height: 100%; }
.img-fluid { max-width: 100%; height: auto; }
.rounded-4 { border-radius: 1rem; }
.position-relative { position: relative; }

.display-4 {
    font-size: clamp(2.2rem, 4vw + 1rem, 3.5rem);
    line-height: 1.15;
}

.py-4 { padding-block: 1.5rem; }
.py-5 { padding-block: 3rem; }
.px-4 { padding-inline: 1.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.me-2 { margin-right: 0.5rem; }
.ms-auto { margin-left: auto; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }

.col-6 { width: 50%; }

@media (min-width: 768px) {
    .col-md-2 { width: 16.6667%; }
    .col-md-3 { width: 25%; }
    .col-md-4 { width: 33.3333%; }
}

.navbar {
    display: flex;
    align-items: center;
}

.navbar .container {
    display: flex;
    align-items: center;
    width: min(100% - 2rem, 1140px);
}

.navbar-brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.navbar-toggler {
    margin-left: auto;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 0.5rem;
    padding: 0.35rem 0.5rem;
    cursor: pointer;
}

.navbar-toggler-icon {
    display: block;
    width: 1.25rem;
    height: 1.25rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='rgba(255,255,255,0.95)' stroke-linecap='round' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100%;
}

.navbar-collapse {
    display: none;
    width: 100%;
}

.navbar-collapse.show {
    display: block;
}

.navbar-nav {
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
}

.nav-link {
    display: block;
    text-decoration: none;
    color: #fff;
}

.nav-link.active,
.nav-link:hover {
    color: var(--warning-color);
}

@media (min-width: 992px) {
    .navbar-expand-lg .navbar-toggler {
        display: none;
    }

    .navbar-expand-lg .navbar-collapse {
        display: flex;
        justify-content: flex-end;
        width: auto;
    }

    .navbar-expand-lg .navbar-nav {
        display: flex;
        align-items: center;
        margin: 0;
        gap: 0.5rem;
    }
}

.btn {
    display: inline-block;
    border: 1px solid transparent;
    text-decoration: none;
    cursor: pointer;
    line-height: 1.2;
}

.btn-sm {
    padding: 0.45rem 0.85rem;
    font-size: 0.9rem;
}

.btn-lg {
    padding: 0.9rem 1.35rem;
    font-size: 1.05rem;
}

.btn-outline-light {
    border-color: #f8f9fa;
    color: #f8f9fa;
}

.btn-outline-light:hover {
    background: #f8f9fa;
    color: #1a1a2e;
}

.btn-outline-warning {
    border-color: var(--warning-color);
    color: var(--warning-color);
}

.btn-outline-warning:hover {
    background: var(--warning-color);
    color: #1a1a2e;
}

/* Lightweight icon fallbacks to avoid loading Font Awesome CSS */
.fas,
.fab {
    font-style: normal;
    display: inline-block;
    width: 1.25em;
    text-align: center;
}

.fa-phone::before { content: "\260E"; }
.fa-envelope::before { content: "\2709"; }
.fa-globe::before { content: "\1F310"; }
.fa-facebook-f::before { content: "f"; font-weight: 700; }
.fa-x-twitter::before { content: "X"; font-weight: 700; }
.fa-instagram::before { content: "\25CB"; }
.fa-google::before { content: "G"; font-weight: 700; }
.fa-certificate::before { content: "\1F3C5"; }
.fa-bolt::before { content: "\26A1"; }
.fa-clock::before { content: "\23F1"; }
.fa-file-contract::before { content: "\1F4C4"; }
.fa-shield-alt::before { content: "\1F6E1"; }
.fa-handshake::before { content: "\1F91D"; }
.fa-headset::before { content: "\1F3A7"; }
.fa-clipboard-check::before { content: "\2713"; }
.fa-plug::before { content: "\1F50C"; }
.fa-lightbulb::before { content: "\1F4A1"; }
.fa-tools::before { content: "\1F6E0"; }
.fa-industry::before { content: "\1F3ED"; }
.fa-file-alt::before { content: "\1F4C3"; }
.fa-building::before { content: "\1F3E2"; }
.fa-store::before { content: "\1F3EA"; }
.fa-warehouse::before { content: "\1F3EC"; }
.fa-cogs::before { content: "\2699"; }
.fa-school::before { content: "\1F3EB"; }
.fa-key::before { content: "\1F511"; }
.fa-city::before { content: "\1F3D9"; }
.fa-file-shield::before { content: "\1F5C2"; }
.fa-clipboard-list::before { content: "\1F4CB"; }
.fa-balance-scale::before { content: "\2696"; }

/* Navbar Styles */
.navbar {
    padding: 1rem 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-size: 1.4rem;
}

.nav-link {
    padding: 0.5rem 1rem !important;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--warning-color) !important;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    padding-top: 100px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.badge-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 1.5rem 2rem;
    text-align: center;
    color: white;
    transition: transform 0.3s ease;
}

.badge-item:hover {
    transform: translateY(-5px);
}

.badge-item i {
    font-size: 2.5rem;
    color: var(--warning-color);
    display: block;
    margin-bottom: 0.5rem;
}

.badge-item span {
    font-weight: 500;
}

/* Feature Cards */
.feature-card {
    background: #16213e;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    text-align: center;
    border: 1px solid #1f3a5f;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    border-color: #ffc107;
}

.feature-card h5 {
    color: #ffffff;
}

.feature-card p {
    color: #ffffff;
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--warning-color) 0%, #ffa000 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.feature-icon i {
    font-size: 2rem;
    color: #212529;
}

/* Service Cards */
.service-card {
    background: #16213e;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    border: 1px solid #1f3a5f;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    border-color: var(--warning-color);
}

.service-card h5 {
    color: #ffffff;
}

.service-card p {
    color: #ffffff;
}

.service-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.service-icon i {
    font-size: 1.5rem;
    color: white;
}

.service-card h5 {
    margin-bottom: 1rem;
    font-weight: 600;
}

/* About Stats */
.about-stats {
    padding: 1rem;
}

.stat-card {
    background: rgba(255, 193, 7, 0.1);
    border: 2px solid var(--warning-color);
    border-radius: 15px;
    padding: 2rem 1rem;
    text-align: center;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: scale(1.05);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--warning-color);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

/* Testimonial Cards */
.testimonial-card {
    background: #16213e;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.3);
    height: 100%;
    border: 1px solid #1f3a5f;
}

.testimonial-text {
    font-style: italic;
    color: #ffffff;
    margin-bottom: 1.5rem;
    position: relative;
}

.testimonial-text::before {
    content: '"';
    font-size: 4rem;
    color: var(--warning-color);
    position: absolute;
    top: -20px;
    left: -10px;
    opacity: 0.3;
    font-family: Georgia, serif;
}

.testimonial-author strong {
    color: #ffffff;
}

.testimonial-author span {
    color: #cccccc;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056d2 100%);
}

/* Footer */
.footer {
    background: #1a1a2e;
}

.social-links {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--warning-color);
    color: #212529;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--warning-color);
}

.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact li {
    margin-bottom: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.footer-contact a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-contact a:hover {
    color: var(--warning-color);
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    padding: 150px 0 80px;
    text-align: center;
    color: white;
}

.page-header h1 {
    font-weight: 700;
    margin-bottom: 1rem;
}

.breadcrumb {
    justify-content: center;
    background: transparent;
}

.breadcrumb-item a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: var(--warning-color);
}

.breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.5);
}

/* Service Detail Cards for Services Page */
.service-detail-card {
    background: #16213e;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    border: 1px solid #1f3a5f;
}

.service-detail-card:hover {
    transform: translateY(-5px);
}

.service-detail-card .service-image {
    height: 200px;
    background-size: cover;
    background-position: center;
}

.service-detail-card .service-content {
    padding: 2rem;
}

.service-detail-card h4 {
    font-weight: 600;
    margin-bottom: 1rem;
}

/* About Page Styles */
.about-content {
    padding: 2rem 0;
}

.about-image {
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
}

.value-card {
    text-align: center;
    padding: 2rem;
    background: #16213e;
    border-radius: 15px;
    border: 1px solid #1f3a5f;
}

.value-card h5 {
    color: #ffffff;
}

.value-card p {
    color: #ffffff;
}

.value-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056d2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.value-icon i {
    font-size: 2rem;
    color: white;
}

/* Contact Page Styles */
.contact-form {
    background: #16213e;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    border: 1px solid #1f3a5f;
}

.contact-form h3,
.contact-form .form-label {
    color: #ffffff;
}

.contact-form p {
    color: #ffffff;
}

.contact-form .form-control {
    padding: 0.875rem 1rem;
    border-radius: 10px;
    border: 2px solid #1f3a5f;
    background-color: #0f3460;
    color: #e0e0e0;
    transition: border-color 0.3s ease;
}

.contact-form .form-control:focus {
    border-color: var(--warning-color);
    box-shadow: none;
    background-color: #1a4a7a;
}

.contact-form .form-control::placeholder {
    color: #8899aa;
}

.contact-form .form-check-label {
    color: #ffffff;
}

.contact-info-card {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 20px;
    padding: 2.5rem;
    color: white;
    height: 100%;
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.contact-info-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 193, 7, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

.contact-info-icon i {
    font-size: 1.25rem;
    color: var(--warning-color);
}

.contact-info-item h6 {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: white;
}

.contact-info-item p {
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

.contact-info-item a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-info-item a:hover {
    color: var(--warning-color);
}

/* Map */
.map-container {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    border: 1px solid #1f3a5f;
}

/* Accordion Dark Theme */
.accordion-item {
    background-color: #16213e;
    border-color: #1f3a5f;
}

.accordion-button {
    background-color: #16213e;
    color: #ffffff;
}

.accordion-button:not(.collapsed) {
    background-color: #0f3460;
    color: var(--warning-color);
}

.accordion-button:focus {
    box-shadow: none;
    border-color: #1f3a5f;
}

.accordion-button::after {
    filter: invert(1);
}

.accordion-body {
    background-color: #16213e;
    color: #ffffff;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-warning {
    background: var(--warning-color);
    border-color: var(--warning-color);
    color: #212529;
}

.btn-warning:hover {
    background: #e0a800;
    border-color: #e0a800;
    transform: translateY(-2px);
}

.btn-primary:hover,
.btn-outline-primary:hover {
    transform: translateY(-2px);
}

.btn-outline-light:hover {
    transform: translateY(-2px);
}

/* Utility Classes */
.section-padding {
    padding: 80px 0;
}

/* Readable text on dark backgrounds */
.text-readable {
    color: #ffffff !important;
}

.text-white-50 {
    color: #ffffff !important;
}

.text-muted {
    color: #ffffff !important;
}

/* Responsive Adjustments */
@media (max-width: 991.98px) {
    .hero-section {
        padding-top: 80px;
        min-height: auto;
        padding-bottom: 60px;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .badge-item {
        padding: 1rem 1.5rem;
    }
    
    .badge-item i {
        font-size: 2rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}

@media (max-width: 767.98px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-badges {
        justify-content: center;
    }
    
    .badge-item {
        flex: 0 0 45%;
    }
    
    .page-header {
        padding: 120px 0 60px;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .contact-form,
    .contact-info-card {
        padding: 1.5rem;
    }
    
    .service-card,
    .feature-card {
        padding: 1.5rem;
    }
}

@media (max-width: 575.98px) {
    .badge-item {
        flex: 0 0 100%;
    }
    
    .hero-section .btn-lg {
        display: block;
        width: 100%;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* Scroll animations - add class via JS */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}
