/* Apex Signature Builders - Main Stylesheet */
/* Black & Silver Theme with Monte Carlo Logo Font */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=MonteCarlo&family=Roboto:wght@300;400;500;700&family=Roboto+Slab:wght@400;600;700&display=swap');

/* CSS Variables for Theme Colors */
:root {
    --color-black: #000000;
    --color-dark: #1a1a1a;
    --color-gray-900: #1f2937;
    --color-gray-800: #374151;
    --color-gray-700: #4b5563;
    --color-gray-600: #6b7280;
    --color-gray-500: #9ca3af;
    --color-silver: #c0c5ce;
    --color-silver-light: #d1d5db;
    --color-silver-lighter: #e5e7eb;
    --color-white: #ffffff;
    --color-accent-blue: #0891b2;
    --color-accent-blue-dark: #075985;

    --font-logo: 'MonteCarlo', cursive;
    --font-heading: 'Roboto Slab', serif;
    --font-body: 'Roboto', sans-serif;

    --max-width: 1400px;
    --header-height: 110px;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-gray-800);
    background-color: var(--color-white);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    color: var(--color-black);
    margin-bottom: 1rem;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* Header & Navigation */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--color-black);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.header-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    padding: 0.65rem 0;
}

.logo-roof {
    width: 90px;
    height: 20px;
    display: block;
    margin-bottom: -5px;
}

.logo-text {
    font-family: var(--font-logo);
    font-size: 43px;
    font-weight: 400;
    line-height: 1.25;
    letter-spacing: -0.5px;
    background: linear-gradient(180deg, #F9FAFB 0%, #E5E7EB 25%, #C0C5CE 50%, #9CA3AF 75%, #6B7280 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    padding: 3px 0 5px 0;
    margin-top: -10px;
    margin-bottom: -5px;
}

.logo-subtext {
    font-family: var(--font-body);
    font-size: 7.5px;
    font-weight: 300;
    color: #9CA3AF;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin: 0;
    padding: 0;
}

.logo-decorative-line {
    width: 90px;
    height: 1px;
    background: #6B7280;
    margin-top: 0;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.main-nav a {
    color: var(--color-silver-light);
    font-weight: 400;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    padding: 0.5rem 0;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-silver);
    transition: width 0.3s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--color-white);
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--color-silver);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Main Content Area */
main {
    margin-top: var(--header-height);
}

/* Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* Hero Section */
.hero {
    position: relative;
    height: 90vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero-small {
    height: 45vh;
    min-height: 400px;
    background-size: cover;
    background-position: center 30%;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.65), rgba(0,0,0,0.8));
}

.hero-content {
    position: relative;
    text-align: center;
    color: var(--color-white);
    max-width: 900px;
    padding: 2rem;
}

.hero h1 {
    color: var(--color-white);
    font-size: 4rem;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-small h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--color-silver-lighter);
}

.hero-small p {
    font-size: 1.2rem;
    margin-bottom: 0;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.btn-primary {
    background-color: var(--color-black);
    color: var(--color-white);
    border: 2px solid var(--color-silver);
}

.btn-primary:hover {
    background-color: var(--color-silver);
    color: var(--color-black);
}

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

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

/* Section Styles */
section {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--color-black);
}

.section-subtitle {
    color: var(--color-gray-600);
    font-size: 1.1rem;
    max-width: 700px;
    margin: 1.5rem auto 0;
}

/* Background Variations */
.bg-white {
    background-color: var(--color-white);
}

.bg-light-gray {
    background-color: #f9fafb;
}

.bg-dark {
    background-color: var(--color-dark);
    color: var(--color-silver-light);
}

.bg-dark h2,
.bg-dark h3,
.bg-dark h4 {
    color: var(--color-white);
}

/* Grid Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
}

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

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

/* Cards */
.card {
    background: var(--color-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

.card-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.card-content {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.card-text {
    color: var(--color-gray-600);
    font-size: 0.95rem;
}

/* Clickable Card - entire card acts as a link */
.card-clickable {
    position: relative;
    cursor: pointer;
}

.card-link {
    color: var(--color-black);
    font-weight: 500;
    margin-top: 1rem;
    display: inline-block;
    text-decoration: none;
}

.card-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.card-link:hover {
    color: var(--color-gray-600);
}

/* Footer */
.site-footer {
    background-color: var(--color-black);
    color: var(--color-silver-light);
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--color-white);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.footer-section p,
.footer-section a {
    color: var(--color-silver-light);
    font-size: 0.9rem;
    line-height: 1.8;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--color-gray-700);
    color: var(--color-gray-500);
    font-size: 0.85rem;
}

/* Contact Info */
.contact-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.contact-info i {
    color: var(--color-silver);
    font-size: 1.1rem;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-silver);
    border-radius: 50%;
    color: var(--color-silver);
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: var(--color-silver);
    color: var(--color-black);
}

/* Partnership Banner */
.partnership-banner {
    background: linear-gradient(135deg, #0284c7 0%, #0891b2 50%, #075985 100%);
    padding: 1.25rem 1.5rem;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    max-width: 100%;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.partnership-banner:hover {
    transform: scale(1.02);
}

/* Wide screen adjustments */
@media (min-width: 1600px) {
    .hero-small {
        height: 55vh;
        min-height: 500px;
    }
}

@media (min-width: 2200px) {
    .hero-small {
        height: 60vh;
        min-height: 550px;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    :root {
        --header-height: 80px;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .logo-container {
        gap: 5.5px;
        padding: 0.48rem 0;
    }

    .logo-roof {
        width: 66.5px;
        height: 14.7px;
        margin-bottom: -4px;
    }

    .logo-text {
        font-size: 30px;
        padding: 2px 0 4px 0;
        margin-top: -7px;
        margin-bottom: -3px;
    }

    .logo-subtext {
        font-size: 6.2px;
        letter-spacing: 1.9px;
    }

    .logo-decorative-line {
        width: 66.5px;
    }

    .main-nav {
        position: fixed;
        top: var(--header-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background-color: var(--color-black);
        transition: left 0.3s ease;
        padding: 2rem;
    }

    .main-nav.active {
        left: 0;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 1rem;
    }

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

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero {
        background-attachment: scroll;
    }

    .hero-small {
        height: 30vh;
        min-height: 200px;
    }

    .hero-small h1 {
        font-size: 2rem;
    }

    .hero-small p {
        font-size: 1rem;
    }

    h1 { font-size: 2rem; }
    .hero h1 { font-size: 2.5rem; }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

/* Gallery Carousel */
.gallery-carousel {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.carousel-container {
    display: flex;
    gap: 1rem;
    overflow-x: scroll; /* Use scroll instead of auto for iOS */
    overflow-y: hidden;
    padding: 0.5rem 0;
    -webkit-overflow-scrolling: touch; /* Smooth momentum scrolling on iOS */
    flex: 1; /* Take available space */
    position: relative;
    z-index: 1; /* Lower than buttons */
}

.carousel-container::-webkit-scrollbar {
    height: 8px;
}

.carousel-container::-webkit-scrollbar-track {
    background: var(--color-silver-lighter);
    border-radius: 4px;
}

.carousel-container::-webkit-scrollbar-thumb {
    background: var(--color-silver);
    border-radius: 4px;
}

.carousel-container::-webkit-scrollbar-thumb:hover {
    background: var(--color-gray-600);
}

.carousel-image {
    min-width: calc(33.333% - 0.67rem);
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    flex-shrink: 0;
}

.carousel-image:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background-color 0.3s ease;
}

.carousel-arrow:hover {
    background-color: rgba(0, 0, 0, 0.9);
}

.carousel-arrow-left {
    left: -20px;
}

.carousel-arrow-right {
    right: -20px;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
    animation: zoomIn 0.3s ease;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.lightbox-close:hover {
    color: var(--color-silver);
}

/* Lightbox Navigation Buttons */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10002;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Form Success Modal */
.form-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
}

.form-modal.active {
    display: flex;
}

.form-modal-content {
    background-color: white;
    padding: 3rem;
    border-radius: 12px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    animation: slideIn 0.4s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.form-modal-icon {
    margin-bottom: 1.5rem;
}

.form-modal-icon i {
    font-size: 4rem;
    color: #22c55e;
}

.form-modal-icon.error i {
    color: #ef4444;
}

.form-modal-content h2 {
    margin-bottom: 1rem;
    color: var(--color-black);
}

.form-modal-content p {
    color: var(--color-gray-600);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.form-modal-content .btn {
    min-width: 200px;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive Carousel */
@media (max-width: 768px) {
    .carousel-image {
        min-width: 100%;
        height: 280px;
    }

    .lightbox-close {
        top: 10px;
        right: 20px;
        font-size: 30px;
    }

    .lightbox-nav {
        width: 48px;
        height: 80px;
        font-size: 1.25rem;
        border-radius: 8px;
        /* Fix touch area by using margin instead of transform */
        top: 50%;
        margin-top: -40px;
        transform: none;
        /* Touch optimizations */
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(255, 255, 255, 0.3);
        z-index: 10000;
    }

    /* Override hover transform on mobile to prevent button jump */
    .lightbox-nav:hover {
        transform: none;
    }

    .lightbox-nav:active {
        background: rgba(255, 255, 255, 0.5);
        opacity: 0.8;
        transform: none;
    }

    .lightbox-prev {
        left: 5px;
    }

    .lightbox-next {
        right: 5px;
    }

    /* Lightbox image - allow swipe */
    .lightbox-content {
        touch-action: pan-x;
    }
}

/* Partnership Badge Hover Effect */
a:hover div[style*="background: linear-gradient"] {
    transform: scale(1.05);
}

/* Portfolio "See More" Feature */
.project-card {
    opacity: 1;
}

.project-hidden {
    display: none;
    opacity: 0;
}

/* Project Grid Layout */
.project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
    gap: 4rem;
}

.project-grid-reversed .project-image-desktop {
    order: 2;
}

.project-grid-reversed .project-details {
    order: 1;
}

.project-image-desktop img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

/* Mobile image hidden by default (shown on mobile) */
.project-image-mobile {
    display: none;
}

.project-image-mobile img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

/* Mobile: Single column, show mobile image, hide desktop image */
@media (max-width: 768px) {
    .project-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    /* Hide desktop image on mobile */
    .project-image-desktop {
        display: none;
    }

    /* Show mobile image (positioned after location/status) */
    .project-image-mobile {
        display: block;
    }

    /* Reset order on mobile - not needed since desktop image is hidden */
    .project-grid-reversed .project-image-desktop,
    .project-grid-reversed .project-details {
        order: unset;
    }
}

/* ========================================
   ACCESSIBILITY IMPROVEMENTS
   ======================================== */

/* Skip Link for Keyboard Users */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-black);
    color: var(--color-white);
    padding: 8px 16px;
    z-index: 10001;
    text-decoration: none;
    font-weight: 500;
    transition: top 0.3s ease;
}

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

/* Focus Indicators for Keyboard Navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--color-accent-blue);
    outline-offset: 2px;
}

/* Remove default outline since we're using focus-visible */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: none;
}

/* ========================================
   ENHANCED BUTTON EFFECTS
   ======================================== */

/* Enhanced Button Hover */
.btn {
    transform: translateY(0);
}

.btn-primary:hover {
    background-color: var(--color-silver);
    color: var(--color-black);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.btn-secondary:hover {
    background-color: var(--color-white);
    color: var(--color-black);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(255, 255, 255, 0.2);
}

/* Button Size Variants */
.btn-sm {
    padding: 0.75rem 1.5rem;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 1.25rem 3rem;
    font-size: 1.05rem;
}

/* ========================================
   FORM INPUT IMPROVEMENTS
   ======================================== */

/* Input Focus States */
input:focus,
textarea:focus,
select:focus {
    border-color: var(--color-accent-blue) !important;
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1);
}

/* Input Hover States */
input:hover,
textarea:hover,
select:hover {
    border-color: var(--color-silver);
}

/* ========================================
   ENHANCED CARD EFFECTS
   ======================================== */

/* Premium Card Styling */
.card {
    border: 1px solid var(--color-silver-lighter);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* ========================================
   ANIMATIONS
   ======================================== */

/* Page Entrance Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

main {
    animation: fadeInUp 0.5s ease-out;
}

/* Hero Subtle Zoom Animation */
@keyframes heroZoom {
    from {
        transform: scale(1.05);
    }
    to {
        transform: scale(1);
    }
}

.hero::before {
    animation: heroZoom 1s ease-out;
}

/* ========================================
   TABLET BREAKPOINT (768-1024px)
   ======================================== */

@media (min-width: 769px) and (max-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

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

    h1 {
        font-size: 2.5rem;
    }

    .hero h1 {
        font-size: 3rem;
    }

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

    .carousel-image {
        min-width: calc(50% - 0.5rem);
    }
}

/* ========================================
   IMPROVED CAROUSEL ARROW VISIBILITY
   ======================================== */

.carousel-arrow {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.6) 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.carousel-arrow:hover {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.8) 100%);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Mobile Touch Target Size & Touch Optimization */
@media (max-width: 768px) {
    .gallery-carousel {
        padding: 0; /* No padding - buttons inside image */
        overflow: visible;
        position: relative;
    }

    .carousel-container {
        pointer-events: auto;
    }

    .carousel-arrow {
        /* Match lightbox button style - rectangular, inside the image */
        width: 48px;
        height: 80px;
        min-width: 48px;
        min-height: 80px;
        border-radius: 8px;
        z-index: 999;
        font-size: 1.25rem;
        background: rgba(0, 0, 0, 0.3); /* More transparent */
        /* Eliminate 300ms tap delay on mobile */
        touch-action: manipulation;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
        /* Visual touch feedback */
        -webkit-tap-highlight-color: rgba(255, 255, 255, 0.3);
        pointer-events: auto !important;
        cursor: pointer;
        /* Use margin-top instead of transform for centering */
        top: 50%;
        margin-top: -40px;
        transform: none;
    }

    /* Override hover transform on mobile to prevent button jump */
    .carousel-arrow:hover {
        transform: none;
    }

    /* Position buttons at the edge of the image */
    .carousel-arrow-left {
        left: 0;
    }

    .carousel-arrow-right {
        right: 0;
    }

    /* Active/pressed state for touch feedback - no transform to prevent jump */
    .carousel-arrow:active {
        background: rgba(255, 255, 255, 0.4);
        opacity: 0.8;
        transform: none;
    }
}

/* ========================================
   SNAPPIER NAV ANIMATIONS
   ======================================== */

.main-nav a::after {
    transition: width 0.2s ease;
}

/* ========================================
   MODAL ARIA HIDDEN SUPPORT
   ======================================== */

.form-modal[aria-hidden="true"] {
    display: none;
}

.form-modal[aria-hidden="false"] {
    display: flex;
}

/* ========================================
   BLOG STYLES
   ======================================== */

/* Blog Grid - Listing Page */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

/* Blog Card */
.blog-card {
    background: var(--color-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.blog-card-image-link {
    display: block;
    overflow: hidden;
}

.blog-card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.blog-card-content {
    padding: 1.5rem;
}

.blog-card-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    color: var(--color-gray-500);
}

.blog-category {
    color: var(--color-accent-blue);
    font-weight: 500;
}

.blog-category i,
.blog-date i,
.blog-read-time i {
    margin-right: 0.35rem;
}

.blog-card-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.blog-card-title a {
    color: var(--color-black);
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-card-title a:hover {
    color: var(--color-accent-blue);
}

.blog-card-excerpt {
    color: var(--color-gray-600);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.blog-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--color-silver-lighter);
}

.blog-read-more {
    color: var(--color-black);
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-read-more:hover {
    color: var(--color-accent-blue);
}

.blog-read-more i {
    margin-left: 0.35rem;
    transition: transform 0.3s ease;
}

.blog-read-more:hover i {
    transform: translateX(4px);
}

/* Blog Article Page */
.blog-article {
    background: var(--color-white);
}

.article-header {
    position: relative;
    height: 50vh;
    min-height: 400px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background-size: cover;
    background-position: center;
    padding: 3rem 2rem;
}

.article-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.2) 100%);
}

.article-header-content {
    position: relative;
    text-align: center;
    color: var(--color-white);
    max-width: 900px;
    width: 100%;
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.article-meta .blog-category,
.article-meta .blog-date,
.article-meta .blog-read-time {
    color: var(--color-silver-light);
}

.article-meta .blog-category {
    color: var(--color-accent-blue);
}

.article-header h1 {
    color: var(--color-white);
    font-size: 2.75rem;
    margin-bottom: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* Article Content Layout */
.article-content .container {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 3rem;
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.article-body {
    max-width: 100%;
}

.article-intro {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--color-gray-700);
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--color-silver-lighter);
}

.article-body h2 {
    font-size: 1.75rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--color-black);
}

.article-body h3 {
    font-size: 1.35rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: var(--color-dark);
}

.article-body p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--color-gray-700);
    margin-bottom: 1.25rem;
}

.article-body ul,
.article-body ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.article-body li {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--color-gray-700);
    margin-bottom: 0.5rem;
}

.article-body a {
    color: var(--color-accent-blue);
    text-decoration: underline;
}

.article-body a:hover {
    color: var(--color-accent-blue-dark);
}

/* Article CTA Box */
.article-cta {
    background: var(--color-silver-lighter);
    padding: 2rem;
    border-radius: 12px;
    margin-top: 3rem;
    text-align: center;
}

.article-cta h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.article-cta p {
    margin-bottom: 1.5rem;
    color: var(--color-gray-600);
}

/* Article Sidebar */
.article-sidebar {
    position: sticky;
    top: calc(var(--header-height) + 2rem);
    height: fit-content;
}

.sidebar-widget {
    background: var(--color-white);
    border: 1px solid var(--color-silver-lighter);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.sidebar-widget h4 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--color-black);
}

.sidebar-widget p {
    font-size: 0.9rem;
    color: var(--color-gray-600);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.sidebar-link {
    color: var(--color-accent-blue);
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
}

.sidebar-link:hover {
    color: var(--color-accent-blue-dark);
}

.sidebar-link i {
    margin-left: 0.25rem;
}

.sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-list li {
    margin-bottom: 0.5rem;
}

.sidebar-list a {
    color: var(--color-gray-700);
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.sidebar-list a:hover {
    color: var(--color-accent-blue);
}

.sidebar-cta {
    background: var(--color-dark);
    border-color: var(--color-dark);
}

.sidebar-cta h4,
.sidebar-cta p {
    color: var(--color-white);
}

.sidebar-cta p {
    color: var(--color-silver-light);
}

/* Blog Responsive */
@media (max-width: 1024px) {
    .article-content .container {
        grid-template-columns: 1fr;
    }

    .article-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }

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

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .article-header {
        height: 40vh;
        min-height: 300px;
    }

    .article-header h1 {
        font-size: 1.75rem;
    }

    .article-meta {
        gap: 1rem;
        font-size: 0.8rem;
    }

    .article-body h2 {
        font-size: 1.5rem;
    }

    .article-body h3 {
        font-size: 1.2rem;
    }

    .article-body p,
    .article-body li {
        font-size: 1rem;
    }

    .article-intro {
        font-size: 1.1rem;
    }

    .article-sidebar {
        grid-template-columns: 1fr;
    }
}
