/*
 * SANOL ENGINEERING - MODERN UI ENHANCEMENTS
 * Add this stylesheet to upgrade the website's appearance
 *
 * HOW TO USE:
 * Add this line to the <head> section of your HTML files (after existing CSS):
 * <link rel="stylesheet" href="ui-enhancements/modern-style.css">
 */

/* ============================================
   SANOL ENGINEERING BRAND COLORS
   ============================================ */
:root {
    /* Primary Brand Colors - Sanol Engineering */
    --primary-red: #ef2f16;        /* Sanol Red - Main brand color */
    --primary-blue: #0a3467;       /* Sanol Blue - Secondary brand color */
    --primary-dark: #000000;       /* Black - Deep contrast */
    --primary-gray: #3b3939;       /* Sanol Gray - Neutral */

    /* Lighter/Darker Variants (auto-generated) */
    --primary-blue-light: #1a4e8f;
    --primary-red-light: #ff4a2d;
    --primary-red-dark: #c62512;

    /* Accent Colors */
    --accent-orange: #ff6b35;
    --accent-green: #28a745;
    --accent-gold: #ffc107;

    /* Neutral Colors */
    --gray-50: #f8f9fa;
    --gray-100: #f1f3f5;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-700: #495057;
    --gray-900: #3b3939;           /* Using Sanol Gray */
    --black: #000000;              /* Pure black */

    /* Modern Shadows */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);
    --shadow-xl: 0 16px 48px rgba(0,0,0,0.18);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ============================================
   SMOOTH SCROLLING & TYPOGRAPHY
   ============================================ */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.7;
    color: var(--gray-900);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Modern Headings */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.02em;
    color: var(--gray-900);
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 1.5rem;
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    margin-bottom: 1.25rem;
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 1rem;
}

/* ============================================
   MODERN HEADER ENHANCEMENTS
   ============================================ */
.header_mid {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

/* Sticky Header Effect */
.header_mid.sticky {
    box-shadow: var(--shadow-md);
    padding: 0.5rem 0;
}

/* Logo Enhancement */
.logo_wrap {
    transition: transform var(--transition-base);
}

.logo_wrap:hover {
    transform: scale(1.05);
}

/* ============================================
   MODERN NAVIGATION MENU
   ============================================ */
.navigation_wrap nav ul li a {
    position: relative;
    padding: 0.75rem 1.25rem !important;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: all var(--transition-fast);
    border-radius: 8px;
}

.navigation_wrap nav ul li a:hover {
    background: var(--gray-100);
    color: var(--primary-red) !important;
    transform: translateY(-2px);
}

/* Modern Underline Effect */
.navigation_wrap nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--primary-red);
    transition: all var(--transition-base);
    transform: translateX(-50%);
    border-radius: 3px 3px 0 0;
}

.navigation_wrap nav ul li a:hover::after {
    width: 80%;
}

/* ============================================
   MODERN BUTTONS
   ============================================ */
button,
.button,
.btn,
input[type="submit"],
input[type="button"] {
    padding: 0.875rem 2rem;
    font-weight: 600;
    border-radius: 50px;
    border: none;
    background: linear-gradient(135deg, var(--primary-red), var(--primary-red-light));
    color: white !important;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    cursor: pointer;
    text-transform: none;
    letter-spacing: 0.03em;
}

button:hover,
.button:hover,
.btn:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, var(--primary-red-dark), var(--primary-red));
}

/* Secondary Button Style */
.button.secondary,
.btn-secondary {
    background: white;
    color: var(--primary-blue) !important;
    border: 2px solid var(--primary-blue);
}

.button.secondary:hover,
.btn-secondary:hover {
    background: var(--primary-blue);
    color: white !important;
}

/* ============================================
   MODERN CARDS & CONTENT BLOCKS
   ============================================ */
.cmsmasters_post,
.cmsmasters_project,
.project-item,
.service-box,
.team-member {
    border-radius: 16px;
    overflow: hidden;
    background: white;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    border: 1px solid var(--gray-200);
}

.cmsmasters_post:hover,
.cmsmasters_project:hover,
.project-item:hover,
.service-box:hover,
.team-member:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-red);
}

/* Card Images */
.cmsmasters_post img,
.cmsmasters_project img,
.project-item img {
    transition: transform var(--transition-slow);
}

.cmsmasters_post:hover img,
.cmsmasters_project:hover img,
.project-item:hover img {
    transform: scale(1.1);
}

/* ============================================
   MODERN HERO/BANNER SECTIONS
   ============================================ */
.cmsmasters_row {
    position: relative;
}

.hero-section,
.banner-section {
    position: relative;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--black) 100%);
    padding: 6rem 0;
    color: white;
}

.hero-section::before,
.banner-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* ============================================
   MODERN FORM INPUTS
   ============================================ */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="password"],
input[type="search"],
textarea,
select {
    padding: 0.875rem 1.25rem;
    border: 2px solid var(--gray-300);
    border-radius: 12px;
    background: white;
    font-size: 1rem;
    transition: all var(--transition-fast);
    width: 100%;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 4px rgba(239, 47, 22, 0.15);
}

/* Modern Form Labels */
label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
    color: var(--gray-700);
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}

/* ============================================
   MODERN FOOTER
   ============================================ */
footer,
.footer {
    background: var(--gray-900);
    color: var(--gray-300);
    padding: 3rem 0 1.5rem;
}

footer h3,
footer h4,
.footer h3,
.footer h4 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

footer a,
.footer a {
    color: var(--gray-300);
    transition: color var(--transition-fast);
}

footer a:hover,
.footer a:hover {
    color: var(--primary-red);
}

/* ============================================
   MODERN IMAGE HOVER EFFECTS
   ============================================ */
.image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.image-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(10, 52, 103, 0.85), rgba(0, 0, 0, 0.85));
    opacity: 0;
    transition: opacity var(--transition-base);
}

.image-wrapper:hover::after {
    opacity: 1;
}

/* ============================================
   MODERN ICONS & BADGES
   ============================================ */
.icon-box {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary-red), var(--primary-red-light));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.icon-box:hover {
    transform: translateY(-4px) rotate(5deg);
    box-shadow: var(--shadow-lg);
}

/* Modern Badge */
.badge {
    padding: 0.375rem 0.875rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-block;
    background: var(--primary-red);
    color: white;
}

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

.animate-fade-in {
    animation: fadeInUp 0.6s ease-out;
}

/* ============================================
   MODERN SPACING & LAYOUT
   ============================================ */
.modern-section {
    padding: 5rem 0;
}

.modern-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Modern Grid */
.modern-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* ============================================
   MODERN ACCESSIBILITY IMPROVEMENTS
   ============================================ */
:focus-visible {
    outline: 3px solid var(--primary-red);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Skip to main content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-red);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 10000;
}

.skip-link:focus {
    top: 0;
}

/* ============================================
   MODERN CLIENT LOGOS
   ============================================ */
.client-logo-wrapper {
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.client-logo-wrapper:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.client-logo-wrapper img {
    max-width: 100%;
    height: auto;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all var(--transition-base);
}

.client-logo-wrapper:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

/* ============================================
   TEAM MEMBER STYLES
   ============================================ */
.team-member {
    background-color: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
}

.team-member:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-red);
}

.team-member img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.team-member-content {
    padding: 1.5rem;
}

.team-member-content h3 {
    margin-top: 0;
    font-size: 1.5rem;
}

.team-member-content .team-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-red);
    margin-top: -1rem;
    margin-bottom: 1rem;
}

.team-member-content .team-qualifications {
    font-size: 0.875rem;
    color: var(--gray-700);
    margin-bottom: 1rem;
    font-style: italic;
}


/* ============================================
   RESPONSIVE IMPROVEMENTS
   ============================================ */
@media (max-width: 768px) {
    .modern-section {
        padding: 3rem 0;
    }

    .modern-container {
        padding: 0 1.5rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .modern-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }
.p-5 { padding: 3rem; }

/* Modern Color Classes */
.text-primary { color: var(--primary-red); }
.text-secondary { color: var(--primary-blue); }
.text-success { color: var(--accent-green); }
.text-warning { color: var(--accent-gold); }
.text-danger { color: var(--primary-red); }

.bg-primary { background-color: var(--primary-red); }
.bg-secondary { background-color: var(--primary-blue); }
.bg-light { background-color: var(--gray-50); }
.bg-dark { background-color: var(--black); }

/* ============================================
   LOADING STATES
   ============================================ */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary-red);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
