/**
 * J&D Actuation Theme Custom Styles
 * 
 * @package JD_Actuation
 */

/* ==========================================
   Variables & Root Styles
   ========================================== */
:root {
    --primary-color: #2C6CA4;
    --secondary-color: #14447C;
    --accent-color: #2C6CA4;
    --text-color: #334155;
    --light-bg: #f8fafc;
    --dark-bg: #14447C;
    --border-radius: 8px;
    --transition: all 0.3s ease;
    
    /* Bootstrap color overrides */
    --bs-primary: #2C6CA4;
    --bs-primary-rgb: 44, 108, 164;
    --bs-secondary: #14447C;
    --bs-secondary-rgb: 20, 68, 124;
    --bs-dark: #14447C;
    --bs-dark-rgb: 20, 68, 124;
    
    /* Bootstrap button overrides */
    --bs-btn-bg: #2C6CA4;
    --bs-btn-border-color: #2C6CA4;
    --bs-btn-hover-bg: #14447C;
    --bs-btn-hover-border-color: #14447C;
    --bs-btn-active-bg: #14447C;
    --bs-btn-active-border-color: #14447C;
    
    /* Bootstrap link color */
    --bs-link-color: #2C6CA4;
    --bs-link-hover-color: #14447C;
}

/* ==========================================
   Global Styles
   ========================================== */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    line-height: 1.7;
    padding-top: 76px; /* Height of fixed navbar */
}

.site-content {
    min-height: 60vh;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Padding Classes */
.py-6 {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

@media (min-width: 768px) {
    .py-6 {
        padding-top: 7rem;
        padding-bottom: 7rem;
    }
}

/* ==========================================
   Header & Navigation
   ========================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    background: var(--dark-bg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar {
    transition: var(--transition);
}

/* Centered navbar layout on desktop */
@media (min-width: 992px) {
    .navbar .container {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        gap: 1rem;
    }
    
    .navbar-brand {
        grid-column: 1;
        justify-self: start;
    }
    
    .navbar-toggler {
        display: none;
    }
    
    .navbar-collapse {
        grid-column: 2;
        display: flex !important;
        justify-content: center;
    }
    
    .navbar-nav {
        margin: 0 !important;
    }
    
    .navbar-cta-btn {
        grid-column: 3;
        justify-self: end;
    }
}

.navbar-brand img {
    max-height: 40px;
    width: auto;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: var(--transition);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
    color: #fff !important;
}

.navbar .btn-primary {
    padding: 0.5rem 1.5rem;
}

/* ==========================================
   Hero Section
   ========================================== */
.hero-section {
    position: relative;
    background: linear-gradient(135deg, #14447C 0%, #2C6CA4 100%);
    color: #fff;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 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.05"%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');
    opacity: 0.5;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-section .badge {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    padding: 0.5rem 1rem;
}

.hero-section h1 {
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero-buttons .btn {
    min-width: 150px;
    font-weight: 600;
}

@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .hero-buttons .btn:last-child {
        margin-bottom: 0;
    }
}

/* ==========================================
   Stats Section
   ========================================== */
.stats-section {
    border-bottom: 1px solid #e2e8f0;
}

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

.stat-item h2 {
    font-weight: 700;
}

/* ==========================================
   Services Section
   ========================================== */
.service-card {
    transition: var(--transition);
    border: 1px solid #e2e8f0 !important;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
}

.service-icon {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(44, 108, 164, 0.1);
    border-radius: var(--border-radius);
}

/* ==========================================
   About Section
   ========================================== */
.about-image-placeholder {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
}

.about-section .badge {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    padding: 0.5rem 1rem;
}

.about-section img {
    object-fit: cover;
    max-height: 500px;
    width: 100%;
}

/* ==========================================
   Testimonials Section
   ========================================== */
.testimonial-card {
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.carousel-control-prev,
.carousel-control-next {
    width: auto;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 50px;
    height: 50px;
}

.carousel-indicators {
    margin-bottom: 0;
}

.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--primary-color);
}

.client-logos span {
    opacity: 0.6;
    transition: var(--transition);
}

.client-logos span:hover {
    opacity: 1;
}

/* ==========================================
   Contact Section
   ========================================== */
.contact-form-wrapper {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.contact-form .form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.contact-form .form-control,
.contact-form .form-select {
    border: 2px solid #e2e8f0;
    padding: 0.75rem 1rem;
    transition: var(--transition);
}

.contact-form .form-control:focus,
.contact-form .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(44, 108, 164, 0.1);
}

.contact-item .contact-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(44, 108, 164, 0.1);
    border-radius: var(--border-radius);
}

/* ==========================================
   Footer
   ========================================== */
.site-footer {
    background-color: var(--dark-bg);
    margin-top: auto;
}

.site-footer .footer-logo img {
    max-height: 40px;
    width: auto;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7) !important;
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color) !important;
    padding-left: 5px;
}

.social-links a {
    transition: var(--transition);
}

.social-links a:hover {
    transform: translateY(-3px);
    color: var(--primary-color) !important;
}

/* Footer bottom styles */
.site-footer .text-muted {
    color: rgba(255, 255, 255, 0.6) !important;
}

.site-footer .list-inline-item a {
    color: rgba(255, 255, 255, 0.7) !important;
    text-decoration: none;
    transition: var(--transition);
}

.site-footer .list-inline-item a:hover {
    color: var(--primary-color) !important;
}

/* Footer legal menu - inline with separators */
.footer-legal-menu {
    display: inline-flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-legal-menu li {
    display: inline-block;
    padding: 0;
}

.footer-legal-menu li:not(:last-child)::after {
    content: "|";
    color: rgba(255, 255, 255, 0.5);
    margin: 0 0.5rem;
}

.footer-legal-menu a {
    color: rgba(255, 255, 255, 0.7) !important;
    text-decoration: none;
    transition: var(--transition);
}

.footer-legal-menu a:hover {
    color: var(--primary-color) !important;
}

/* ==========================================
   Back to Top Button
   ========================================== */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
}

#back-to-top:hover {
    transform: translateY(-5px);
}

#back-to-top.show {
    display: flex;
}

/* ==========================================
   Badges
   ========================================== */
.badge {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    padding: 0.5rem 1rem;
}

/* ==========================================
   Buttons
   ========================================== */
.btn {
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(44, 108, 164, 0.3);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-outline-light:hover {
    transform: translateY(-2px);
}

/* ==========================================
   Animations
   ========================================== */
[data-aos] {
    opacity: 0;
    transition-property: transform, opacity;
}

[data-aos].aos-animate {
    opacity: 1;
}

/* ==========================================
   Utilities
   ========================================== */
.text-white-50 {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* Custom Logo */
.custom-logo {
    max-height: 40px;
    width: auto;
}

.custom-logo-link {
    display: inline-block;
}

/* ==========================================
   Responsive Adjustments
   ========================================== */
@media (max-width: 991px) {
    body {
        padding-top: 70px;
    }
    
    .navbar-nav {
        padding: 1rem 0;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 0 !important;
    }
    
    .navbar-collapse .btn-primary {
        width: 100%;
        margin-top: 1rem;
    }
}

@media (max-width: 768px) {
    .py-6 {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
    
    .display-3 {
        font-size: 2.5rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 1.75rem;
    }
}

/* ==========================================
   Print Styles
   ========================================== */
@media print {
    .site-header,
    .site-footer,
    #back-to-top,
    .hero-buttons {
        display: none;
    }
}
