/* ============================================
   COMMON COMPONENTS - Reusable Styles
   ============================================ */

/* Section Header */
.section-header {
    text-align: center;
    /* Reduced bottom margin to tighten vertical rhythm */
    margin-bottom: var(--spacing-md);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.section-label {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: var(--spacing-sm);
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    color: var(--primary-navy);
    margin-bottom: var(--spacing-sm);
}

.section-description {
    font-size: 1.125rem;
    color: var(--text-light);
    line-height: 1.8;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    text-align: center;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: width var(--transition-normal);
    z-index: -1;
}

.btn:hover::before {
    width: 100%;
}

.btn-primary {
    background: var(--accent-gold);
    color: var(--white);
    border-color: var(--accent-gold);
}

.btn-primary:hover {
    background: #c89841;
    border-color: #c89841;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--primary-navy);
    transform: translateY(-2px);
}

.btn-submit {
    width: 100%;
    padding: 1.25rem 2rem;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

/* Overlays */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(12, 27, 51, 0.9) 0%, rgba(12, 27, 51, 0.7) 100%);
}

/* ============================================
    WHY CHOOSE US - Visibility & Cards
    ============================================ */
.why-choose-us {
    background: linear-gradient(180deg, #ffffff 0%, #f7f8fa 100%);
    padding: 80px 0;
    /* ensure section has vertical space */
    position: relative;
}

/* USP Grid: responsive 3/2/1 columns */
.usp-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

@media (min-width: 576px) {
    .usp-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .usp-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.usp-card {
    background: #ffffff;
    border: 1px solid rgba(12, 27, 51, 0.08);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.usp-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.usp-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent-gold) 0%, #c89841 100%);
    color: #fff;
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
}

.usp-card h3 {
    color: var(--primary-navy);
}

.usp-card p {
    color: #334155;
}

/* Defensive: prevent AOS from hiding elements */
/* AOS visibility overrides consolidated later; removed per-section duplication */

/* Improve initial entrance (optional subtle fade) */
.why-choose-us .usp-card {
    animation: fadeIn 0.6s ease both;
}

.why-choose-us .usp-card:nth-child(2) {
    animation-delay: .05s;
}

.why-choose-us .usp-card:nth-child(3) {
    animation-delay: .1s;
}

.why-choose-us .usp-card:nth-child(4) {
    animation-delay: .15s;
}

.why-choose-us .usp-card:nth-child(5) {
    animation-delay: .2s;
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--light-gray);
    border-top-color: var(--accent-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Pulse Animation */
@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Slide In Animations */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

/* Background Patterns */
.bg-pattern {
    position: relative;
    overflow: hidden;
}

.bg-pattern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(30deg, rgba(212, 169, 83, 0.05) 12%, transparent 12.5%, transparent 87%, rgba(212, 169, 83, 0.05) 87.5%, rgba(212, 169, 83, 0.05)),
        linear-gradient(150deg, rgba(212, 169, 83, 0.05) 12%, transparent 12.5%, transparent 87%, rgba(212, 169, 83, 0.05) 87.5%, rgba(212, 169, 83, 0.05)),
        linear-gradient(30deg, rgba(212, 169, 83, 0.05) 12%, transparent 12.5%, transparent 87%, rgba(212, 169, 83, 0.05) 87.5%, rgba(212, 169, 83, 0.05)),
        linear-gradient(150deg, rgba(212, 169, 83, 0.05) 12%, transparent 12.5%, transparent 87%, rgba(212, 169, 83, 0.05) 87.5%, rgba(212, 169, 83, 0.05));
    background-size: 80px 140px;
    z-index: 0;
}

.bg-pattern>* {
    position: relative;
    z-index: 1;
}

/* ============================================
   SHARED CARD BASE (non-destructive consolidation)
   ============================================ */
.service-card,
.project-card,
.usp-card,
.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
}

/* ============================================
   UTILITIES (Gradients, Icons, Animations)
   ============================================ */
.gradient-gold {
    background: linear-gradient(135deg, var(--accent-gold) 0%, #c89841 100%);
}

.icon-square {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.icon-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.icon-56 {
    width: 56px;
    height: 56px;
    font-size: 1.4rem;
}

.icon-64 {
    width: 64px;
    height: 64px;
    font-size: 1.5rem;
}

.icon-80 {
    width: 80px;
    height: 80px;
    font-size: 2rem;
}

/* Animation utility classes (replacing bespoke duplicates) */
.anim-fade {
    animation: fadeIn .6s ease both;
}

.anim-slide-left {
    animation: slideInLeft .6s ease-out both;
}

.anim-slide-right {
    animation: slideInRight .6s ease-out both;
}