/*
Theme Name: CloudSore Solutions
Theme URI: https://cloudsoresolutions.com
Description: Custom WordPress theme for CloudSore Solutions - IT, Accounting, and TallyPrime Services
Version: 1.0.5
Author: CloudSore Development Team
*/

/* ============================================
   CSS Variables & Global Styles
   ============================================ */
:root {
    --primary-color: #2057A6;
    --secondary-color: #2980C4;
    --accent-color: #EC6738;
    --dark-color: #000000;
    --light-gray: #F4F6F9;
    --border-color: #E2E8F0;
    --text-color: #0E2A4D;
    --white: #ffffff;
    --success-color: #28a745;
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-secondary: 'Poppins', sans-serif;
    --transition: all 0.3s ease;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.16);
    --space-xs: 8px;
    --space-sm: 16px;
    --space-md: 24px;
    --space-lg: 32px;
    --space-xl: 48px;
    --space-xxl: 64px;
}

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

html {
    font-size: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    color: var(--text-color);
    line-height: 1.6;
    font-size: 1rem;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-secondary);
    font-weight: 600;
    line-height: 1.3;
    color: var(--dark-color);
    margin-bottom: var(--space-md);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.5rem, 3.5vw, 2rem); }
h4 { font-size: clamp(1.25rem, 3vw, 1.5rem); }
h5 { font-size: clamp(1.1rem, 2.5vw, 1.25rem); }
h6 { font-size: clamp(1rem, 2vw, 1rem); }

p {
    margin-bottom: var(--space-md);
    font-size: clamp(0.95rem, 2vw, 1.1rem);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
    width: 100%;
}

.container-fluid {
    width: 100%;
    padding: 0 var(--space-md);
}

.section-padding {
    padding: clamp(40px, 8vw, 80px) 0;
}

.section-title {
    text-align: center;
    margin-bottom: clamp(30px, 6vw, 50px);
}

.section-title h2 {
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: clamp(40px, 8vw, 60px);
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.section-title p {
    color: #666;
    font-size: clamp(1rem, 2vw, 1.1rem);
    margin-top: 15px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================
   Header & Navigation
   ============================================ */
.site-header {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    transition: transform 0.3s ease;
}

.site-header.scrolled {
    box-shadow: var(--shadow-md);
}

/* ---- Top Bar ---- */
.top-bar {
    background: var(--primary-color);
    color: var(--white);
    padding: 10px 0;
    font-size: 0.9rem;
}

.top-bar-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-sm);
}

.contact-info {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.contact-info a {
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.contact-info a:hover {
    opacity: 0.8;
}

.social-links {
    display: flex;
    gap: var(--space-sm);
}

.social-links a {
    color: var(--white);
    font-size: 1rem;
    transition: var(--transition);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.social-links a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* ---- Main Navigation Bar ---- */
.main-navigation {
    padding: 16px 0;
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(32, 87, 166, 0.07);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-md);
    position: relative;
}

.site-branding {
    flex-shrink: 0;
    z-index: 1001;
}

.custom-logo-link {
    display: block;
    line-height: 0;
}

.custom-logo {
    max-width: clamp(140px, 20vw, 180px);
    height: auto;
    display: block;
}

.site-logo {
    display: inline-block;
}

.site-title {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
}

.site-description {
    font-size: clamp(0.75rem, 1.5vw, 0.85rem);
    color: #666;
    display: block;
    margin-top: 2px;
}

/* ---- Desktop Nav Menu ---- */
.nav-menu {
    display: flex;
    list-style: none;
    gap: clamp(4px, 1vw, 8px);
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-menu li {
    position: relative;
}

.nav-menu li a {
    color: var(--text-color);
    font-weight: 500;
    padding: 9px 14px;
    display: block;
    border-radius: 6px;
    position: relative;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    white-space: nowrap;
    transition: var(--transition);
}

/* Blue hover state - desktop */
.nav-menu li a:hover {
    color: var(--primary-color);
    background-color: #eef3fb;
}

/* Blue active / current page state */
.nav-menu li.current-menu-item > a,
.nav-menu li.current_page_item > a,
.nav-menu li.current-menu-ancestor > a,
.nav-menu li.current_page_ancestor > a {
    background-color: var(--primary-color);
    color: var(--white) !important;
    border-radius: 6px;
}

/* Remove the underline pseudo-element - replaced with bg highlight */
.nav-menu li a::after {
    display: none;
}

/* Home item: don't highlight on non-home pages */
body:not(.home) .nav-menu li.menu-item-home > a {
    background-color: transparent;
    color: var(--text-color);
}

body:not(.home) .nav-menu li.menu-item-home > a:hover {
    background-color: #eef3fb;
    color: var(--primary-color);
}

/* ---- Dropdown sub-menus ---- */
.nav-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    box-shadow: 0 6px 20px rgba(32, 87, 166, 0.12);
    border-radius: 0 0 8px 8px;
    list-style: none;
    padding: 6px 0;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 200;
}

.nav-menu li:hover > .sub-menu,
.nav-menu li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-menu .sub-menu a {
    color: var(--text-color);
    padding: 10px 18px;
    border-radius: 0;
    font-weight: 400;
    transition: all 0.2s ease;
}

.nav-menu .sub-menu a:hover {
    background-color: #eef3fb;
    color: var(--primary-color);
    padding-left: 24px;
}

/* ---- Header CTA Button ---- */
.header-cta {
    flex-shrink: 0;
    margin-left: var(--space-sm);
}

.header-cta .btn {
    white-space: nowrap;
    padding: clamp(10px, 2vw, 12px) clamp(18px, 3vw, 28px);
    font-size: clamp(0.85rem, 1.5vw, 0.95rem);
}

/* ---- Hamburger / Mobile Toggle ---- */
.mobile-toggle {
    display: none;
    background: none;
    border: 2px solid var(--primary-color);
    border-radius: 6px;
    cursor: pointer;
    padding: 8px;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    position: relative;
    flex-shrink: 0;
    transition: background-color 0.2s ease;
}

.mobile-toggle:hover {
    background-color: var(--primary-color);
}

.mobile-toggle:hover .hamburger-line {
    background-color: var(--white);
}

.hamburger {
    display: block;
    position: relative;
    width: 24px;
    height: 18px;
}

.hamburger-line {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-color);
    position: absolute;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.hamburger-line:nth-child(1) { top: 0; }
.hamburger-line:nth-child(2) { top: 8px; }
.hamburger-line:nth-child(3) { top: 16px; }

/* Animated X state */
.mobile-toggle.active .hamburger-line {
    background-color: var(--primary-color);
}

.mobile-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg);
    top: 8px;
}

.mobile-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: translateX(-8px);
}

.mobile-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg);
    top: 8px;
}

/* ---- Mobile Overlay ---- */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(14, 42, 77, 0.55);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ============================================
   HERO SECTION - STANDARD (For all pages)
   ============================================ */
.hero-section {
    background: linear-gradient(135deg, #0066cc 0%, #00a3ff 100%);
    color: var(--white);
    padding: clamp(60px, 12vw, 120px) 0;
    position: relative;
    overflow: hidden;
    min-height: clamp(500px, 70vh, 700px);
    display: flex;
    align-items: center;
}

.hero-with-bg {
    background-image: url('assets/home-hero/cloudsoresolutions-home-hero-1.webp');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: scroll;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.6) 0%,
        rgba(32, 87, 166, 0.5) 20%,
        rgba(0, 0, 0, 0.6) 100%
    );
    z-index: 0;
}

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

.hero-content {
    max-width: 700px;
    position: relative;
    z-index: 2;
    width: 100%;
}

.hero-title {
    color: var(--white);
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.6),
                 0 0 20px rgba(0, 0, 0, 0.4);
    margin-bottom: 20px;
    animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
    color: var(--white);
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6),
                 0 0 15px rgba(0, 0, 0, 0.3);
    opacity: 0.95;
    font-size: clamp(1rem, 3vw, 1.3rem);
    margin-bottom: clamp(20px, 4vw, 30px);
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: clamp(12px, 2vw, 14px) clamp(20px, 3vw, 32px);
    border-radius: 50px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    line-height: 1;
    min-height: 44px;
}

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

.btn-primary:hover {
    background: #ff5520;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary-color);
}

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

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* ============================================
   VIDEO HERO SECTION (Home page only)
   ============================================ */

.hero-video-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.hero-video-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    object-fit: cover;
    object-position: center center;
    z-index: 0;
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    opacity: 0;
    transition: opacity 0.8s ease-in;
}

.hero-video-bg.loaded {
    opacity: 1;
}

.hero-video .hero-overlay {
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.65) 0%,
        rgba(32, 87, 166, 0.55) 20%,
        rgba(0, 0, 0, 0.65) 100%
    );
    z-index: 1;
}

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

/* ============================================
   PRODUCTS SECTION WITH BACKGROUND
   ============================================ */
.products-highlight-bg {
    background-image: url('assets/home-hero/home-hero-2.webp');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: scroll;
    position: relative;
}

.products-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.95) 0%,
        rgba(244, 246, 249, 0.92) 25%,
        rgba(255, 255, 255, 0.95) 50%
    );
    z-index: 0;
}

.products-title {
    color: var(--dark-color);
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

.products-subtitle {
    color: #666;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
}

.products-highlight-bg .product-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.products-highlight-bg .product-card:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-8px);
}

/* ============================================
   INDUSTRIES SECTION WITH BACKGROUND
   ============================================ */
.industries-section-bg {
    background-image: url('assets/home-hero/home-hero-3.webp');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: scroll;
    position: relative;
}

.industries-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.94) 0%,
        rgba(244, 246, 249, 0.91) 25%,
        rgba(255, 255, 255, 0.94) 50%
    );
    z-index: 0;
}

.industries-title {
    color: var(--dark-color);
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

.industries-subtitle {
    color: #666;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
}

.industries-section-bg .industry-item {
    background: rgba(255, 255, 255, 0.70);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.industries-section-bg .industry-item:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-8px);
}

.industries-section-bg .btn-outline {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.industries-section-bg .btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* ============================================
   GRID & CARDS
   ============================================ */
.grid {
    display: grid;
    gap: clamp(20px, 4vw, 30px);
    align-items: stretch;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 350px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }

/* ============================================
   SERVICE CARDS
   ============================================ */
.card {
    background: var(--white);
    border-radius: 12px;
    padding: 0;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.card .card-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
    background: var(--light-gray);
}

.card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    transition: transform 0.3s ease;
    display: block;
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: clamp(20px, 4vw, 30px);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-icon {
    width: clamp(50px, 8vw, 70px);
    height: clamp(50px, 8vw, 70px);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin: 0 auto 20px;
    flex-shrink: 0;
}

.card h3 {
    margin-bottom: 15px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.card p {
    color: #666;
    line-height: 1.7;
    flex-grow: 1;
    margin-bottom: 20px;
    min-height: 100px;
}

.card .btn {
    margin-top: auto;
}

/* ============================================
   PRODUCT CARDS
   ============================================ */
.product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    padding: 0;
    overflow: hidden;
}

.product-card .card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
    background: var(--light-gray);
}

.product-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    transition: transform 0.3s ease;
    display: block;
}

.product-card:hover .card-image img {
    transform: scale(1.05);
}

.product-category-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 2;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.product-card-content {
    padding: clamp(20px, 4vw, 30px);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-card .card-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    flex-shrink: 0;
}

.product-card h4 {
    font-size: 20px;
    margin-bottom: 12px;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.product-card p {
    flex-grow: 1;
    margin-bottom: 20px;
    line-height: 1.6;
    min-height: 80px;
    color: #666;
}

.product-actions {
    margin-top: auto;
    padding-top: 15px;
}

.product-actions .btn {
    width: 100%;
}

/* ============================================
   INDUSTRY ITEMS
   ============================================ */
.industry-item {
    text-align: center;
    padding: clamp(20px, 4vw, 30px);
    border-radius: 12px;
    transition: var(--transition);
    background: var(--white);
    border: 1px solid var(--border-color);
}

.industry-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.industry-icon {
    width: clamp(60px, 10vw, 80px);
    height: clamp(60px, 10vw, 80px);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin: 0 auto 20px;
}

.industry-item h4 {
    margin-bottom: 10px;
    color: var(--dark-color);
}

.industry-item p {
    color: #666;
    margin-bottom: 0;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
}

/* ============================================
   FEATURES LIST
   ============================================ */
.features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.features-list li {
    padding: clamp(15px, 3vw, 20px);
    margin-bottom: clamp(15px, 3vw, 20px);
    background: var(--white);
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.features-list li:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow-md);
}

.features-list li:last-child {
    margin-bottom: 0;
}

.features-list li strong {
    display: block;
    margin-bottom: 8px;
}

.features-list li p {
    margin-bottom: 0;
    color: #666;
    line-height: 1.6;
}

/* ============================================
   CONTACT FORMS
   ============================================ */
.contact-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
    gap: clamp(30px, 6vw, 50px);
}

.contact-info-box {
    background: var(--light-gray);
    padding: clamp(25px, 5vw, 40px);
    border-radius: 12px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: clamp(15px, 3vw, 25px);
}

.contact-item-icon {
    width: clamp(40px, 8vw, 50px);
    height: clamp(40px, 8vw, 50px);
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: clamp(10px, 2vw, 20px);
    flex-shrink: 0;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
    width: 100%;
    padding: clamp(12px, 2vw, 15px);
    margin-bottom: clamp(15px, 3vw, 20px);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: var(--font-primary);
    font-size: clamp(0.95rem, 1.5vw, 1rem);
    transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(32, 87, 166, 0.1);
}

.contact-form textarea {
    min-height: clamp(120px, 25vw, 150px);
    resize: vertical;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: var(--dark-color);
    color: var(--white);
    padding: clamp(40px, 8vw, 60px) 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    gap: clamp(25px, 5vw, 40px);
    margin-bottom: clamp(25px, 5vw, 40px);
}

.footer-column {
    width: 100%;
}

.footer-column .widget ul:empty,
.footer-column .widget p:empty,
.footer-column .widget:empty,
.footer-column:empty,
.footer-column ul:empty,
.footer-column .menu:empty {
    display: none !important;
}

.footer-widget {
    margin-bottom: 0;
}

.footer-widget h3 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    position: relative;
    padding-bottom: 10px;
}

.footer-widget h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--accent-color);
}

.footer-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-widget ul li {
    margin-bottom: 10px;
    padding-left: 0;
    transition: var(--transition);
}

.footer-widget ul li:hover {
    padding-left: 8px;
}

.footer-widget ul li i {
    color: var(--accent-color);
    width: 20px;
    margin-right: 10px;
}

.footer-widget a {
    color: rgba(255,255,255,0.8);
    transition: var(--transition);
    display: flex;
    align-items: center;
}

.footer-widget a:hover {
    color: var(--white);
}

.footer-widget p {
    color: rgba(255,255,255,0.8);
    line-height: 1.7;
    margin-bottom: 15px;
}

.footer-social {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.footer-social a {
    color: var(--white);
    background: rgba(255,255,255,0.1);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: var(--transition);
    margin-right: 0 !important;
}

.footer-social a:hover {
    background: var(--accent-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: clamp(20px, 4vw, 30px);
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
}

.footer-bottom p {
    margin-bottom: 0;
}

.footer-bottom i {
    color: #ff6b35;
    margin: 0 5px;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 12px 20px;
    z-index: 10000;
}

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

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}

:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

:focus:not(:focus-visible) {
    outline: none;
}

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

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

/* ============================================
   CONTACT PAGE HERO STYLES
   ============================================ */
.contact-hero {
    min-height: clamp(600px, 85vh, 800px) !important;
    display: flex;
    align-items: center;
    padding: clamp(80px, 12vh, 120px) 0 clamp(60px, 10vh, 100px) !important;
}

.contact-hero .hero-content {
    width: 100%;
}

.hero-contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: clamp(20px, 3vw, 30px);
    margin-top: 40px;
}

.hero-contact-card {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: clamp(20px, 4vw, 30px);
    text-align: center;
    transition: all 0.3s ease;
}

.hero-contact-card:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.hero-contact-icon {
    width: clamp(50px, 8vw, 60px);
    height: clamp(50px, 8vw, 60px);
    background: linear-gradient(135deg, rgba(236, 103, 56, 0.9), rgba(255, 85, 32, 0.9));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: clamp(1.3rem, 3vw, 1.6rem);
    margin: 0 auto 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.hero-contact-card:hover .hero-contact-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 25px rgba(236, 103, 56, 0.4);
}

.hero-contact-card a {
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.hero-contact-card a:hover {
    color: white;
    transform: translateX(3px);
}

.hero-social-links {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 5px;
}

.hero-social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-social-links a:hover {
    background: rgba(236, 103, 56, 0.9);
    border-color: rgba(236, 103, 56, 1);
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Force navigation menu order */
.nav-menu { display: flex; }
.nav-menu .menu-item-home { order: 1; }
.nav-menu .menu-item:has(a[href*="products"]) { order: 2; }
.nav-menu .menu-item:has(a[href*="services"]) { order: 3; }
.nav-menu .menu-item:has(a[href*="about"]) { order: 4; }
.nav-menu .menu-item:has(a[href*="contact"]) { order: 5; }

/* ============================================
   RESPONSIVE - TABLET
   ============================================ */
@media (max-width: 1024px) {
    .container {
        max-width: 960px;
        padding: 0 20px;
    }

    .nav-menu {
        gap: 4px;
    }

    .nav-menu li a {
        font-size: 0.9rem;
        padding: 8px 12px;
    }

    .header-cta .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .hero-section {
        min-height: clamp(450px, 65vh, 650px);
    }

    .hero-with-bg {
        background-position: center center;
    }

    .hero-content {
        max-width: 90%;
    }

    .products-highlight-bg,
    .industries-section-bg {
        background-position: center center;
    }

    .hero-video-bg {
        min-width: 110%;
        min-height: 110%;
    }

    .contact-hero {
        min-height: clamp(550px, 80vh, 700px) !important;
    }

    .hero-contact-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================
   RESPONSIVE - MOBILE
   ============================================ */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .section-padding {
        padding: 50px 0;
    }

    .main-navigation {
        padding: 12px 0;
    }

    .nav-container {
        gap: 10px;
    }

    /* Show hamburger */
    .mobile-toggle {
        display: flex !important;
    }

    /* ═══════════════════════════════════════════
       MOBILE DRAWER  — iOS / Safari safe
       All units are explicit so Safari won't
       collapse the panel to zero height.
       ═══════════════════════════════════════════ */
    .nav-menu {
        /* Slide-in from right */
        position: fixed !important;
        top: 0 !important;
        right: -320px !important;   /* start off-screen (explicit px, not %) */
        bottom: 0 !important;
        width: 300px !important;
        max-width: 85vw !important;
        height: 100% !important;    /* 100% of the fixed parent = viewport */
        min-height: 100vh !important;

        /* Layout */
        display: flex !important;   /* always flex — visibility controlled by right offset */
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0 !important;

        /* Scroll */
        overflow-x: hidden !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch; /* smooth momentum on iOS */

        /* Appearance */
        background: #ffffff !important;
        border-left: 4px solid #2057A6 !important;
        box-shadow: -6px 0 28px rgba(32, 87, 166, 0.18) !important;
        padding: 80px 20px 60px !important;
        margin: 0 !important;
        list-style: none !important;

        /* Stack above overlay (1000) and header (1000) */
        z-index: 1050 !important;

        /* Transition */
        -webkit-transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;

        /* iOS tap highlight */
        -webkit-tap-highlight-color: transparent;
    }

    /* Open state — slide into view */
    .nav-menu.active {
        right: 0 !important;
    }

    /* Drawer items */
    .nav-menu > li {
        width: 100% !important;
        border-bottom: 1px solid #e2e8f0 !important;
        position: static !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .nav-menu > li:last-child {
        border-bottom: none !important;
    }

    .nav-menu > li > a {
        display: block !important;
        width: 100% !important;
        padding: 14px 10px !important;
        font-size: 1.05rem !important;
        font-weight: 500 !important;
        color: #0e2a4d !important;
        background: transparent !important;
        border-radius: 6px !important;
        text-decoration: none !important;
        -webkit-transition: background-color 0.2s ease, color 0.2s ease, padding-left 0.2s ease !important;
        transition: background-color 0.2s ease, color 0.2s ease, padding-left 0.2s ease !important;
        /* iOS: make entire row tappable */
        -webkit-tap-highlight-color: rgba(32, 87, 166, 0.08);
        cursor: pointer;
    }

    /* Hover / focus */
    .nav-menu > li > a:hover,
    .nav-menu > li > a:focus {
        background-color: #eef3fb !important;
        color: #2057A6 !important;
        padding-left: 18px !important;
        outline: none !important;
    }

    /* Active / current page */
    .nav-menu > li.current-menu-item > a,
    .nav-menu > li.current_page_item > a,
    .nav-menu > li.current-menu-ancestor > a {
        background-color: #2057A6 !important;
        color: #ffffff !important;
        font-weight: 600 !important;
        padding-left: 18px !important;
    }

    /* Hide underline pseudo-element inside drawer */
    .nav-menu > li > a::after {
        display: none !important;
    }

    /* Sub-menus in drawer: stack vertically */
    .nav-menu .sub-menu {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        box-shadow: none !important;
        border: none !important;
        border-left: 3px solid #2057A6 !important;
        margin-left: 12px !important;
        padding: 4px 0 !important;
        background: #f8fafd !important;
        border-radius: 0 0 6px 6px !important;
    }

    .nav-menu .sub-menu a {
        padding: 10px 14px !important;
        font-size: 0.95rem !important;
        color: #1e3a5f !important;
    }

    .nav-menu .sub-menu a:hover {
        background-color: #eef3fb !important;
        color: #2057A6 !important;
        padding-left: 20px !important;
    }

    /* Drawer CTA block */
    .header-cta {
        order: -1;
        margin: 0 0 20px 0;
        padding-bottom: 20px;
        border-bottom: 1px solid var(--border-color);
    }

    .header-cta .btn {
        width: 100%;
        justify-content: center;
        padding: 14px 24px;
        font-size: 1rem;
    }

    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }

    .card .card-image {
        height: 200px;
    }

    .product-card .card-image {
        height: 180px;
    }

    .card h3,
    .product-card h4 {
        min-height: auto;
    }

    .card p,
    .product-card p {
        min-height: auto;
    }

    .hero-section {
        min-height: clamp(500px, 65vh, 550px);
        padding: clamp(60px, 10vh, 80px) 0;
    }

    .hero-with-bg {
        background-position: center center;
        background-attachment: scroll;
    }

    .hero-overlay {
        background: linear-gradient(
            135deg,
            rgba(0, 0, 0, 0.7) 0%,
            rgba(32, 87, 166, 0.6) 50%,
            rgba(0, 0, 0, 0.7) 100%
        );
    }

    .hero-video .hero-overlay {
        background: linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.75) 0%,
            rgba(32, 87, 166, 0.65) 40%,
            rgba(0, 0, 0, 0.75) 100%
        );
    }

    .hero-video-bg {
        min-width: 120%;
        min-height: 120%;
    }

    .hero-content {
        max-width: 100%;
        text-align: center;
    }

    .hero-title {
        font-size: clamp(1.75rem, 7vw, 2.5rem);
        margin-bottom: 15px;
        text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.7),
                     0 0 20px rgba(0, 0, 0, 0.5);
    }

    .hero-subtitle {
        font-size: clamp(1rem, 4vw, 1.2rem);
        margin-bottom: 25px;
        text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7),
                     0 0 15px rgba(0, 0, 0, 0.4);
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
        justify-content: center;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .products-highlight-bg,
    .industries-section-bg {
        background-attachment: scroll;
    }

    .products-overlay {
        background: linear-gradient(
            to bottom,
            rgba(255, 255, 255, 0.96) 0%,
            rgba(244, 246, 249, 0.94) 50%,
            rgba(255, 255, 255, 0.96) 100%
        );
    }

    .industries-overlay {
        background: linear-gradient(
            to bottom,
            rgba(255, 255, 255, 0.95) 0%,
            rgba(244, 246, 249, 0.93) 50%,
            rgba(255, 255, 255, 0.95) 100%
        );
    }

    .top-bar-wrapper {
        justify-content: center;
        text-align: center;
    }

    .contact-info {
        justify-content: center;
        flex-direction: column;
        align-items: center;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .footer-social {
        justify-content: flex-start;
    }

    .contact-hero {
        min-height: clamp(650px, 90vh, 750px) !important;
        padding: clamp(70px, 10vh, 90px) 0 clamp(50px, 8vh, 70px) !important;
    }

    .hero-contact-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-top: 30px;
    }
}

@media (max-width: 480px) {
    .custom-logo {
        max-width: 130px;
    }

    .site-title {
        font-size: 1.15rem;
    }

    .site-description {
        font-size: 0.7rem;
    }

    /* Full-width drawer on small phones */
    .nav-menu {
        width: 100% !important;
        max-width: 100% !important;
        right: -100vw !important;   /* start fully off-screen */
        border-left: none !important;
        border-top: 4px solid #2057A6 !important;
        padding: 70px 20px 40px !important;
    }

    .nav-menu.active {
        right: 0 !important;
    }

    .hero-section {
        min-height: clamp(450px, 80vh, 500px);
        text-align: center;
    }

    .hero-with-bg {
        background-position: 60% center;
    }

    .hero-overlay {
        background: linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.75) 0%,
            rgba(32, 87, 166, 0.65) 40%,
            rgba(0, 0, 0, 0.75) 100%
        );
    }

    .hero-video-bg {
        display: none;
    }

    .hero-video {
        background-image: url('assets/home-hero/cloudsoresolutions-home-hero-1.webp');
        background-size: cover;
        background-position: center center;
    }

    .hero-title {
        font-size: clamp(1.5rem, 8vw, 2rem);
        line-height: 1.2;
        text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8),
                     0 0 25px rgba(0, 0, 0, 0.6);
    }

    .hero-subtitle {
        font-size: clamp(0.95rem, 4.5vw, 1.1rem);
        line-height: 1.5;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 12px;
        margin-top: 25px;
    }

    .hero-buttons .btn {
        width: 100%;
        min-height: 48px;
        padding: 14px 20px;
        font-size: 1rem;
    }

    .products-highlight-bg,
    .industries-section-bg {
        background-position: center center;
    }

    .products-overlay,
    .industries-overlay {
        background: rgba(255, 255, 255, 0.97);
    }

    .products-highlight-bg .product-card,
    .industries-section-bg .industry-item {
        background: rgba(255, 255, 255, 0.99);
    }

    .product-category-badge {
        font-size: 0.75rem;
        padding: 5px 12px;
    }

    .industries-section-bg .btn-outline {
        width: 100%;
        max-width: 100%;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-widget h3 {
        margin-bottom: 15px;
    }

    .footer-widget ul li {
        margin-bottom: 8px;
    }

    .footer-social {
        justify-content: center;
    }

    .contact-hero {
        min-height: 700px !important;
    }

    .hero-contact-grid {
        gap: 12px;
        margin-top: 25px;
    }
}

@media (max-width: 380px) {
    .custom-logo {
        max-width: 110px;
    }

    .mobile-toggle {
        width: 40px;
        height: 40px;
    }

    .hamburger {
        width: 22px;
        height: 16px;
    }

    .hero-section {
        min-height: 420px;
        padding: 50px 0;
    }

    .hero-title {
        font-size: 1.4rem;
        margin-bottom: 12px;
    }

    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }

    .hero-video-bg {
        display: none !important;
    }
}

@media (max-height: 600px) and (orientation: landscape) {
    .nav-menu.active {
        padding-top: 60px;
        padding-bottom: 20px;
    }

    .nav-menu li a {
        padding: 12px 0;
        font-size: 0.95rem;
    }

    .header-cta {
        margin-bottom: 12px;
        padding-bottom: 12px;
    }

    .hero-section {
        min-height: 450px;
        padding: 40px 0;
    }

    .hero-title {
        font-size: clamp(1.5rem, 5vw, 2rem);
        margin-bottom: 10px;
    }

    .hero-subtitle {
        font-size: clamp(0.9rem, 3vw, 1.1rem);
        margin-bottom: 20px;
    }

    .hero-buttons .btn {
        padding: 10px 24px;
        font-size: 0.9rem;
    }

    .hero-video-bg {
        min-width: 100%;
        min-height: 140%;
    }
}

/* ============================================
   ACCESSIBILITY & PERFORMANCE
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .nav-menu,
    .mobile-overlay,
    .hamburger-line,
    .social-links a,
    .nav-menu li a,
    .btn,
    .footer-widget a,
    .footer-social a,
    .hero-with-bg,
    .products-highlight-bg,
    .industries-section-bg,
    .hero-video-bg,
    .card .card-image img,
    .product-card .card-image img {
        transition: none;
        background-attachment: scroll;
    }

    .hero-title,
    .hero-subtitle,
    .fade-in-up {
        animation: none;
    }

    .hero-video-bg {
        display: none;
    }

    .hero-video {
        background-image: url('assets/home-hero/cloudsoresolutions-home-hero-1.webp');
        background-size: cover;
        background-position: center center;
        background-attachment: scroll;
    }
}

@media (prefers-reduced-data: reduce) {
    .hero-video-bg {
        display: none;
    }

    .hero-video {
        background-image: url('assets/home-hero/cloudsoresolutions-home-hero-1.webp');
        background-size: cover;
        background-position: center center;
    }
}

.mobile-toggle:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 4px;
    border-radius: 4px;
}

.nav-menu li a:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    background: rgba(32, 87, 166, 0.05);
}

@media (hover: none) and (pointer: coarse) {
    .nav-menu li a {
        min-height: 44px;
        min-width: 44px;
    }

    .mobile-toggle {
        min-width: 48px;
        min-height: 48px;
    }

    .btn {
        min-height: 48px;
    }

    .footer-social a {
        min-width: 48px;
        min-height: 48px;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .mobile-toggle,
    .header-cta,
    .mobile-overlay,
    .top-bar,
    .social-links,
    .footer-social,
    .hero-buttons,
    .hero-video-wrapper,
    .hero-video-bg,
    .card .card-image,
    .product-card .card-image {
        display: none !important;
    }

    .main-navigation {
        box-shadow: none;
        border-bottom: 1px solid #000;
    }

    .nav-menu {
        position: static;
        flex-direction: row;
        padding: 0;
        box-shadow: none;
        height: auto;
        border-left: none;
    }

    .nav-menu li {
        border-bottom: none !important;
    }

    .site-header {
        position: static;
    }

    .hero-section,
    .hero-with-bg,
    .hero-video,
    .products-highlight-bg,
    .industries-section-bg {
        background: none !important;
        min-height: auto !important;
        padding: 40px 0 !important;
    }

    .hero-overlay,
    .products-overlay,
    .industries-overlay {
        display: none !important;
    }

    .hero-title,
    .hero-subtitle,
    .products-title,
    .products-subtitle,
    .industries-title,
    .industries-subtitle {
        color: #000 !important;
        text-shadow: none !important;
    }

    .products-highlight-bg .product-card,
    .industries-section-bg .industry-item {
        background: #fff !important;
        border: 1px solid #ccc !important;
    }

    .site-footer {
        background: #fff !important;
        color: #000 !important;
        border-top: 1px solid #000;
    }

    .footer-widget h3,
    .footer-widget a,
    .footer-bottom {
        color: #000 !important;
    }
}