:root {
    --primary-font: 'Roboto', sans-serif;
    --secondary-font: 'Nunito Sans', sans-serif;
}

body {
    font-family: var(--secondary-font);
    background-color: #F8FAFC;
    color: #0f172a;
    font-size: 16px;
    line-height: 1.65;
    font-weight: 400;
}

/* Typography System */
/* Exclude footer from font family change */
:not(footer):not(footer *)>h1,
:not(footer):not(footer *)>h2,
:not(footer):not(footer *)>h3,
:not(footer):not(footer *)>h4,
:not(footer):not(footer *)>h5 {
    font-family: var(--primary-font);
}

h1 {
    font-size: 34px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.5px;
}

h2 {
    font-size: 26px;
    font-weight: 600;
    line-height: 1.35;
}

h3 {
    font-size: 19px;
    font-weight: 600;
    line-height: 1.45;
}

p:not(footer p) {
    margin-bottom: 20px;
    /* midpoint of 18-22px */
}

/* Desktop Sizes */
@media (min-width: 1024px) {
    h1 {
        font-size: 60px;
    }

    h2 {
        font-size: 37px;
    }

    h3 {
        font-size: 24px;
    }

    body {
        font-size: 17px;
    }

    .nav-links a {
        font-size: 15.5px !important;
        /* Ensure override of Tailwind text-sm */
        letter-spacing: 0.03em;
        font-weight: 500;
    }
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    h1 {
        font-size: 36px;
    }

    h2 {
        font-size: 28px;
    }

    h3 {
        font-size: 19px;
    }

    body {
        font-size: 15.8px;
    }
}

/* Interactive Elements */
button,
.btn,
a[href="contact.html"],
a[href="services.html"].bg-gradient-to-r {
    font-family: var(--secondary-font);
    font-weight: 600;
    font-size: 14.5px;
    letter-spacing: 0.02em;
}

/* Spacing & Readability */
section h2,
.section-title {
    margin-bottom: 24px !important;
}

.logo-text {
    font-weight: 700;
}







.animate-float-slow {
    animation: float 6s ease-in-out infinite;
}

.animate-float-medium {
    animation: float 5s ease-in-out infinite 1s;
}

.animate-float-fast {
    animation: float 4s ease-in-out infinite 2s;
}

@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(5deg);
    }

    100% {
        transform: translateY(0px) rotate(0deg);
    }
}


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



/* Technologies Stack Section */
.tech-octagon {
    width: 140px;
    height: 140px;
    background: white;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
}

.tech-octagon:hover {
    transform: translateY(-20px) scale(1.15);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.3);
    filter: drop-shadow(0 0 20px currentColor);
    z-index: 20;
}

.tech-octagon-border {
    position: absolute;
    inset: 0;
    background: currentColor;
    clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
    z-index: -1;
    padding: 2px;
}

.tech-octagon-inner {
    width: 96%;
    height: 96%;
    background: white;
    clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.tech-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
    margin-bottom: 8px;
    transition: transform 0.3s ease;
}

.tech-octagon:hover .tech-icon {
    transform: scale(1.4) translateY(-5px);
}

.tech-name {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    transition: color 0.3s ease;
}

.tech-octagon:hover .tech-name {
    color: #1e293b;
}

/* Custom Colors for borders */
.border-php {
    color: #A855F7;
}

.border-react {
    color: #61DAFB;
}

.border-node {
    color: #339933;
}

.border-mongodb {
    color: #47A248;
}

.border-nextjs {
    color: #000000;
}

.border-tailwind {
    color: #06B6D4;
}

.border-postgres {
    color: #336791;
}

.border-laravel {
    color: #FF2D20;
}

.border-mysql {
    color: #4479A1;
}

.border-html {
    color: #E34F26;
}

.border-css {
    color: #1572B6;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 640px) {
    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .tech-octagon {
        width: 120px;
        height: 120px;
    }
}

@keyframes gradient-x {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.animate-gradient-x {
    background-size: 200% 200%;
    animation: gradient-x 3s ease infinite;
}

/* ==========================================
   Expertise & Solutions Accordion Section (WHITE BACKGROUND / DARK PREMIUM CARDS)
   ========================================== */

.expertise-section {
    position: relative;
    padding: 4.5rem 0;
    background-color: #FFFFFF;
    /* Pure White Section Background */
    border-top: 1px solid #F1F5F9;
    border-bottom: 1px solid #F1F5F9;
    overflow: hidden;
}

/* Ensure no background grids or blobs disrupt the clean white section layout */
.expertise-section::before {
    display: none;
}

.expertise-accordion {
    display: flex;
    flex-direction: row;
    gap: 1.25rem;
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    height: 410px;
    /* Highly optimized card size */
}

.expertise-card {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    /* Rounded corners 20px */
    background: linear-gradient(135deg, #0b071a 0%, #120b2e 100%);
    /* DARK premium card style */
    border: 1px solid rgba(255, 255, 255, 0.06);
    /* Thin border */
    flex: 1 1 0%;
    min-width: 80px;
    height: 100%;
    cursor: pointer;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    /* Soft shadow */
    transition: flex 0.7s cubic-bezier(0.16, 1, 0.3, 1),
        border-color 0.4s ease,
        box-shadow 0.4s ease,
        background-color 0.4s ease;
}

/* Hover glow for inactive card */
.expertise-card:not(.active):hover {
    border-color: rgba(0, 225, 217, 0.35);
    /* Cyan highlight on hover */
    box-shadow: 0 12px 20px -5px rgba(0, 225, 217, 0.1), 0 0 15px rgba(0, 225, 217, 0.05);
    background: linear-gradient(135deg, #0f0a24 0%, #180f3c 100%);
}

.expertise-card.active {
    flex: 2.4 1 0%;
    /* Balanced expanded card size (~38-42% width) */
    background: linear-gradient(135deg, #0b071a 0%, #1a0f3d 100%);
    border-color: rgba(0, 225, 217, 0.45);
    /* Soft cyan glowing active border */
    box-shadow: 0 25px 40px -15px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(0, 225, 217, 0.15);
    /* Soft premium neon glow */
}

/* Collapsed Layout Styling */
.card-collapsed-layout {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    padding: 0;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.expertise-card.active .card-collapsed-layout {
    opacity: 0;
    pointer-events: none;
}

/* Collapsed Background Service Image */
.collapsed-bg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    filter: grayscale(35%) brightness(0.32);
    /* Darkened premium view */
    transition: filter 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.expertise-card:not(.active):hover .collapsed-bg-img {
    filter: grayscale(0%) brightness(0.48);
    /* Reveal on hover */
    transform: scale(1.05);
    /* Smooth micro zoom */
}

/* Collapsed Overlay for deep vertical gradient */
.collapsed-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(11, 7, 26, 0.45) 0%, rgba(11, 7, 26, 0.85) 100%);
    z-index: 1;
}

.collapsed-content-inner {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 2rem 0.5rem;
    height: 100%;
    width: 100%;
}

.collapsed-icon-wrapper {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00E1D9;
    /* Glowing cyan accent for collapsed cards */
    transition: all 0.3s ease;
}

.expertise-card:hover .collapsed-icon-wrapper {
    background: rgba(0, 225, 217, 0.15);
    border-color: rgba(0, 225, 217, 0.4);
    color: #00E1D9;
    transform: translateY(-2px);
    box-shadow: 0 0 10px rgba(0, 225, 217, 0.2);
}

.collapsed-title {
    writing-mode: vertical-rl;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.22em;
    color: #CBD5E1;
    /* High contrast silver-white on dark background */
    font-size: 0.8rem;
    white-space: nowrap;
    transform: rotate(180deg);
    margin: auto 0;
    transition: color 0.3s ease;
}

.expertise-card:hover .collapsed-title {
    color: #00E1D9;
}

/* Active Layout Styling */
.card-active-layout {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.expertise-card.active .card-active-layout {
    opacity: 1;
    pointer-events: auto;
    transition-delay: 0.15s;
}

/* Image Banner at upper portion of card (Larger, Dominant, Premium) */
.card-image-banner {
    height: 215px;
    /* Increased from 175px to feel dominant and push content down */
    margin: 0.75rem 0.75rem 0 0.75rem;
    overflow: hidden;
    position: relative;
    border-radius: 12px;
    background-color: #120b2e;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.card-image-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.expertise-card.active:hover .card-image-banner img {
    transform: scale(1.04);
    /* Soft zoom effect only */
}

/* Icon Badge Floating inside Image Banner */
.active-icon-badge {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #00E1D9 0%, #00B4D8 100%);
    /* Active Badge */
    border: 1.5px solid #0b071a;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    z-index: 10;
}

/* Content Area Portion (Highly Compact, Spacing Reduced) */
.card-content-area {
    padding: 0.75rem 1.15rem 1.15rem 1.15rem;
    /* Adjusted padding to naturally balance whitespace */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    /* Spans top-down directly */
    gap: 0.45rem;
    /* Tightly balanced gap spacing */
    flex-grow: 1;
}

.active-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #FFFFFF;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

.active-description {
    font-size: 0.8rem;
    color: #94A3B8;
    /* Silver slate readable text */
    line-height: 1.5;
    margin: 0;
}

/* Active CTA Button Area (Brought Slightly Upward) */
.active-btn-group {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-top: 0.25rem;
    /* Placed immediately below description with tiny spacing */
}

.active-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.55rem 1.15rem;
    background: linear-gradient(135deg, #8C52FF 0%, #00E1D9 100%);
    /* Purple/Cyan Premium */
    color: #FFFFFF !important;
    font-weight: 700;
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 9999px;
    box-shadow: 0 4px 10px rgba(0, 225, 217, 0.15);
    transition: all 0.3s ease;
}

.active-cta-btn:hover {
    background: linear-gradient(135deg, #7A3BFF 0%, #00C4BD 100%);
    box-shadow: 0 8px 15px rgba(0, 225, 217, 0.3);
    transform: translateY(-1px);
}

.active-cta-btn svg {
    transition: transform 0.25s ease;
}

.active-cta-btn:hover svg {
    transform: translateX(2px);
}

.active-secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.15rem;
    background: rgba(255, 255, 255, 0.05);
    color: #E2E8F0 !important;
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-weight: 700;
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 9999px;
    transition: all 0.3s ease;
}

.active-secondary-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #FFFFFF !important;
    border-color: rgba(255, 255, 255, 0.2);
}

/* ==========================================
   Responsive Mobile Adjustments
   ========================================== */
@media (max-width: 1023px) {
    .expertise-section {
        padding: 4.5rem 0;
        background-color: #FFFFFF;
    }

    .expertise-accordion {
        flex-direction: column;
        height: auto;
        gap: 0.85rem;
    }

    .expertise-card {
        height: 80px;
        /* Compact mobile collapsed card */
        flex: none;
        width: 100%;
        min-width: 100%;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    }

    .expertise-card.active {
        height: 350px;
        /* Highly compact active card height on mobile */
    }

    .card-collapsed-layout {
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        padding: 0;
    }

    .collapsed-bg-img {
        filter: grayscale(20%) brightness(0.28);
    }

    .collapsed-content-inner {
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        gap: 1.25rem;
        padding: 0 1.5rem;
    }

    .collapsed-icon-wrapper {
        width: 2.5rem;
        height: 2.5rem;
        border-radius: 10px;
    }

    .collapsed-icon-wrapper svg {
        width: 1.15rem;
        height: 1.15rem;
    }

    .collapsed-title {
        writing-mode: horizontal-tb;
        transform: none;
        margin: 0;
        font-size: 0.95rem;
        letter-spacing: 0.05em;
        color: #FFFFFF;
    }

    .card-image-banner {
        height: 150px;
        /* Increased from 125px to push content down on mobile too */
        margin: 0.65rem 0.65rem 0 0.65rem;
        border-radius: 10px;
    }

    .active-icon-badge {
        width: 1.75rem;
        height: 1.75rem;
        top: 0.45rem;
        right: 0.45rem;
    }

    .active-icon-badge svg {
        width: 0.8rem;
        height: 0.8rem;
    }

    .card-content-area {
        padding: 0.65rem 0.85rem 0.85rem 0.85rem;
        gap: 0.4rem;
    }

    .active-title {
        font-size: 0.95rem;
        margin-bottom: 0.1rem;
    }

    .active-description {
        font-size: 0.76rem;
        line-height: 1.45;
    }

    .active-btn-group {
        gap: 0.5rem;
        margin-top: 0.25rem;
    }

    .active-cta-btn,
    .active-secondary-btn {
        padding: 0.45rem 1rem;
        font-size: 0.62rem;
    }
}

/* ==========================================
   Why Businesses Trust ShahRosh TECH Section (Our Edge)
   ========================================== */

.trust-section {
    position: relative;
    padding: 4.5rem 0;
    background-color: #F8FAFC; /* Clean off-white background */
    border-top: 1px solid #F1F5F9;
    border-bottom: 1px solid #F1F5F9;
    overflow: hidden;
}

.trust-badge {
    display: inline-block;
    padding: 0.4rem 1.15rem;
    border: 1px solid rgba(140, 82, 255, 0.15);
    background-color: rgba(140, 82, 255, 0.05);
    border-radius: 9999px;
    margin-bottom: 1.5rem;
}

.trust-badge span {
    color: #8C52FF;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.trust-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: #0F172A; /* Slate-900 */
    letter-spacing: -0.02em;
    text-transform: none;
    margin: 0 0 1rem 0;
    line-height: 1.25;
}

.trust-title-gradient {
    background: linear-gradient(135deg, #8C52FF 0%, #00E1D9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.trust-line {
    width: 50px;
    height: 4px;
    background: rgba(140, 82, 255, 0.3);
    border-radius: 9999px;
    margin-bottom: 1.5rem;
}

.trust-subtitle {
    font-size: 0.95rem;
    color: #64748B; /* Slate-500 */
    max-width: 550px;
    line-height: 1.6;
    margin: 0 auto;
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    width: 100%;
}

.trust-card {
    position: relative;
    background-color: #FFFFFF;
    border: 1.5px solid rgba(140, 82, 255, 0.15); /* Soft, beautiful logo-purple border */
    border-radius: 20px; /* Rounded corners 18px-24px */
    padding: 2.5rem 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.01), 0 2px 4px -1px rgba(0, 0, 0, 0.005);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: default;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    overflow: hidden;
}

/* Hover effects */
.trust-card:hover {
    transform: translateY(-6px); /* Slight upward movement */
    border-color: #8C52FF; /* Vivid solid brand logo purple border on hover */
    box-shadow: 0 20px 25px -5px rgba(140, 82, 255, 0.05), 
                0 10px 10px -5px rgba(0, 225, 217, 0.03); /* Signature purple/cyan subtle brand glow shadow */
}

.trust-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 1.5rem;
}

/* Small modern icon box at top-left - styled using brand purple */
.trust-icon-box {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 14px;
    background-color: rgba(140, 82, 255, 0.07); /* Light brand-purple transparent bg */
    border: 1px solid rgba(140, 82, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8C52FF; /* Signature Brand Purple icon color */
    transition: background-color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.trust-card:hover .trust-icon-box {
    background: linear-gradient(135deg, #8C52FF 0%, #00E1D9 100%); /* Brand logo gradient transition */
    border-color: transparent;
    color: #FFFFFF; /* Pure white icon on hover */
    transform: scale(1.05);
}

.trust-icon {
    width: 1.5rem;
    height: 1.5rem;
}

/* Translucent number styling - using brand purple changing to cyan glow */
.trust-number {
    font-size: 3.25rem;
    font-weight: 900;
    font-style: italic;
    color: rgba(140, 82, 255, 0.08); /* Translucent brand purple text */
    line-height: 1;
    transition: color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.trust-card:hover .trust-number {
    color: rgba(0, 225, 217, 0.18); /* Glow brand cyan overlay color */
}

.trust-card-title {
    font-size: 1.2rem;
    font-weight: 750;
    color: #0F172A; /* Slate-900 */
    margin: 0 0 0.75rem 0;
    letter-spacing: -0.01em;
    transition: color 0.3s ease;
}

.trust-card:hover .trust-card-title {
    color: #8C52FF; /* Brand purple highlight on title hover */
}

.trust-card-description {
    font-size: 0.88rem;
    color: #64748B; /* Slate-500 */
    line-height: 1.6;
    margin: 0;
}

/* ==========================================
   Why Businesses Trust Mobile Responsive Queries
   ========================================== */
@media (max-width: 1023px) {
    .trust-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on Tablet */
        gap: 1.5rem;
    }
    .trust-title {
        font-size: 2rem;
    }
}

@media (max-width: 639px) {
    .trust-section {
        padding: 5rem 0;
    }
    .trust-grid {
        grid-template-columns: 1fr; /* 1 column on Mobile */
        gap: 1.25rem;
    }
    .trust-card {
        padding: 2.25rem 1.75rem;
    }
    .trust-title {
        font-size: 1.75rem;
    }
    .trust-subtitle {
        font-size: 0.9rem;
    }
}