/* Layout and positioning styles */

/* Main content offset for fixed header with safe areas */
main {
    padding-top: var(--header-total-height, calc(60px + env(safe-area-inset-top)));
    min-height: calc(100vh - var(--header-total-height, calc(60px + env(safe-area-inset-top))));
    background: var(--background-content);
}

/* All sections use seamless content background - Spotify inspired */
.hero,
.services-overview,
.certifications,
.page-hero + section,
.content-section,
section:not(.cta):not([class*="gradient"]) {
    background: var(--background-content);
}

/* Remove any margin/padding between sections to prevent gaps */
section {
    margin: 0;
}

section + section {
    border-top: none;
}

/* Ensure containers don't add unexpected spacing */
.container {
    padding-left: 2rem;
    padding-right: 2rem;
}

/* Ensure main content areas on other pages also get the lighter background */
.page-content,
.blog-content,
.services-main,
.case-studies-main {
    background: var(--background-content);
    min-height: 100vh;
}

/* Override for pages that handle their own header spacing */
main.no-header-offset {
    padding-top: 0;
}

/* Header */
.header {
    background: var(--background-darker);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
}

.header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-color);
}

/* Ensure both nav and navbar classes work the same */
.nav, .navbar {
    /* Any nav-specific styles would go here */
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 90px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-logo-icon {
    width: 32px;
    height: 32px;
    background: var(--primary-color);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
}

.nav-logo-icon svg {
    width: 18px;
    height: 18px;
    stroke: white;
    stroke-width: 2;
}

.nav-logo h1 {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    letter-spacing: var(--tracking-tight);
    margin: 0;
}

.nav-logo-highlight {
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.consultation-btn {
    background: var(--primary-color);
    color: black !important;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    font-weight: 600;
}

.consultation-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(82, 191, 64, 0.2);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    background: var(--background-content);
    padding: 4rem 0;
    min-height: 80vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    transition: min-height 0.4s ease;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><radialGradient id="a" cx="50%" cy="50%" r="50%"><stop offset="0%" style="stop-color:%236DBC40;stop-opacity:0.05"/><stop offset="100%" style="stop-color:%236DBC40;stop-opacity:0"/></radialGradient></defs><circle cx="200" cy="200" r="150" fill="url(%23a)"/><circle cx="800" cy="800" r="200" fill="url(%23a)"/><circle cx="600" cy="300" r="100" fill="url(%23a)"/></svg>');
    opacity: 0.3;
    pointer-events: none;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 2;
    min-height: 400px;
}

.hero-title {
    font-family: var(--font-display);
    font-size: var(--text-5xl);
    font-weight: var(--font-extrabold);
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
    margin-bottom: var(--space-4);
    color: var(--text-primary);
}

.hero-subtitle {
    font-family: var(--font-body);
    font-size: var(--text-xl);
    font-weight: var(--font-normal);
    color: var(--text-secondary);
    margin-bottom: var(--space-8);
    line-height: var(--leading-relaxed);
    letter-spacing: var(--tracking-normal);
    max-width: 600px;
    text-align: center;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-content {
    transition: transform 0.4s ease;
    transform: translateY(0);
}

.hero-graphic {
    width: 100%;
    height: 400px;
    background: transparent;
    border-radius: var(--radius-2xl);
    position: relative;
    overflow: visible;
    border: 2px solid #6DBC40;
    box-shadow: 0 0 30px rgba(82, 191, 64, 0.15);
    transition: transform 0.4s ease;
    transform: translateY(0);
}

.hero.console-expanded {
    min-height: calc(80vh + 400px);
    align-items: flex-start;
}

.hero.console-expanded .hero-content {
    transform: translateY(-20px);
    transition: transform 0.4s ease;
}

.hero-graphic.console-expanded {
    transform: translateY(-50px);
    height: 820px;
}

/* Cloud Architecture Animated Slider */
.cloud-architecture-slider {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.provider-indicator {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    z-index: 10;
}

.provider-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--background-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.5s ease;
    opacity: 0.5;
}

.provider-badge.active {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.5);
    color: black;
    font-weight: bold;
    opacity: 1;
    transform: scale(1.05);
    backdrop-filter: blur(10px);
}

.provider-badge:focus,
.provider-badge:active,
.provider-badge:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

.provider-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.7)) drop-shadow(0 0 4px rgba(255, 255, 255, 0.3));
    transition: filter 0.3s ease;
}

.provider-badge.active .provider-logo {
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.7)) drop-shadow(0 0 4px rgba(255, 255, 255, 0.3));
}


.cloud-architecture {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
}

.services-area {
    flex: 1;
    position: relative;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.azure-layer,
.aws-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(3, auto);
    gap: 20px 20px;
    align-items: start;
    justify-items: center;
    padding: 80px 20px 20px 20px;
    align-content: start;
}

.service-group {
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-group:hover {
    transform: scale(1.1);
}

.service-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
    transition: all 0.3s ease;
    background: none !important;
    background-color: transparent !important;
}

/* Animated Slider Layers */
.azure-layer {
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.aws-layer {
    opacity: 1;
    transition: opacity 1s ease-in-out;
}

.azure-layer.fade-out {
    opacity: 0;
}

.aws-layer.fade-in {
    opacity: 1;
}

.azure-layer.fade-in {
    opacity: 1;
}

.aws-layer.fade-out {
    opacity: 0;
}

.azure-icon,
.aws-icon {
    transition: opacity 1s ease-in-out;
    background: none !important;
    background-color: transparent !important;
}

/* Terminal Console Interface */
.service-description {
    position: absolute;
    top: 420px;
    left: 0;
    right: 0;
    background: #0a0a0a;
    border: 2px solid var(--primary-color);
    border-radius: 4px;
    padding: 16px 20px;
    height: 400px;
    overflow-y: auto;
    box-shadow: 0 10px 20px rgba(82, 191, 64, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 20;
    pointer-events: none;
    font-family: 'Courier New', monospace;
}

.service-description.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.service-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0 0 8px 0;
    font-family: 'Courier New', monospace;
}

.service-title::before {
    content: '> ';
    color: var(--primary-color);
}

.service-details {
    font-size: 13px;
    color: var(--primary-color);
    margin: 0;
    line-height: 1.4;
    font-family: 'Courier New', monospace;
    white-space: pre-wrap;
}

.service-pricing {
    font-size: 12px;
    color: var(--primary-color);
    margin: 12px 0 0 0;
    line-height: 1.4;
    font-family: 'Courier New', monospace;
    border-top: 1px solid rgba(82, 191, 64, 0.2);
    padding-top: 8px;
}

.service-pricing::before {
    content: '$ ';
    color: #00ff00;
    font-weight: bold;
}


/* Console Interactive Menu */
.console-menu {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #004400;
    font-family: 'Courier New', monospace;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.console-menu.visible {
    opacity: 1;
    visibility: visible;
}

.menu-prompt {
    color: #00ff00;
    font-size: 13px;
    margin-bottom: 8px;
}

.menu-prompt::before {
    content: '> ';
    color: #00ff00;
}

.menu-options {
    margin-bottom: 12px;
}

.menu-option {
    display: block;
    color: #00ff00;
    font-size: 13px;
    line-height: 1.6;
    cursor: pointer;
    padding: 2px 0;
    transition: background-color 0.2s ease;
    text-decoration: none;
    margin-bottom: 2px;
    outline: none !important;
}

.menu-option:hover {
    background-color: rgba(0, 255, 0, 0.1);
}

.menu-option:focus {
    outline: none !important;
    box-shadow: none !important;
}

.menu-option.active {
    background-color: rgba(0, 255, 0, 0.2);
}

.menu-arrow {
    color: #00ff00;
    font-weight: bold;
    margin-right: 4px;
}

.menu-text {
    color: #00ff00;
}

.menu-instructions {
    color: #00ff00;
    font-size: 11px;
    opacity: 0.7;
    font-style: italic;
}


@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Hover effects for service groups */
.service-group {
    cursor: pointer;
}



/* Grid layouts */
.services-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.services-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.case-studies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.benefits-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.consultation-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

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

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 0.5rem;
}

/* Sections */
.services-overview {
    padding: 5rem 0;
    background: var(--background-dark);
}

.stats {
    padding: 4rem 0;
    background: var(--background-darker);
}

.cta {
    padding: 5rem 0;
    color: white;
}

.cta-content {
    text-align: center;
}

.cta h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

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

.cta .btn-primary:hover {
    background: var(--background-light);
}

.cta-buttons {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
}

.services-detailed {
    padding: 3rem 0;
    background: var(--background-dark);
}

.service-process {
    padding: 3rem 0;
    background: var(--background-darker);
}

.service-process h2 {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

.case-studies-section {
    padding: 3rem 0;
}

.case-studies-stats {
    padding: 3rem 0;
    background: var(--background-dark);
}

.case-studies-stats h2 {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

.contact-info {
    padding: 5rem 0;
    background: var(--background-dark);
}

.contact-details h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.contact-details p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.contact-cta {
    padding: 4rem 0;
    background: var(--primary-color);
    color: white;
}

.contact-cta .cta-content {
    text-align: center;
}

.contact-cta h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.contact-cta p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

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

.contact-cta .btn-primary:hover {
    background: var(--background-light);
}

.consultation-info {
    padding: 5rem 0;
    background: var(--background-dark);
}

.consultation-benefits h2 {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

.consultation-form-section {
    padding: 5rem 0;
}

.consultation-details h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.process-steps {
    margin-bottom: 3rem;
}

.consultation-testimonials {
    padding: 5rem 0;
    background: var(--background-dark);
}

.consultation-testimonials h2 {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

/* Footer */
.footer {
    background: var(--background-darker);
    color: var(--text-primary);
    padding: 1.5rem 0 0.75rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.footer-section h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.footer-section h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.25rem;
}

.footer-section a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 0.75rem;
    text-align: center;
    color: var(--text-light);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--background-white);
        box-shadow: var(--shadow-md);
        padding: 1rem 0;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.125rem;
    }


    .provider-logo {
        width: 20px;
        height: 20px;
    }

    .cloud-architecture {
        padding: 10px;
    }

    .azure-layer,
    .aws-layer {
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: repeat(4, auto);
        gap: 15px 10px;
        padding: 60px 10px 60px 10px;
    }

    /* Align the last 3 icons to the left in the fourth row */
    .azure-layer .service-group:nth-child(13),
    .aws-layer .service-group:nth-child(13) {
        grid-column: 1;
        grid-row: 4;
    }

    .azure-layer .service-group:nth-child(14),
    .aws-layer .service-group:nth-child(14) {
        grid-column: 2;
        grid-row: 4;
    }

    .azure-layer .service-group:nth-child(15),
    .aws-layer .service-group:nth-child(15) {
        grid-column: 3;
        grid-row: 4;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .services-detail-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .case-studies-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

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

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

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

    .contact-grid,
    .consultation-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .process-grid {
        grid-template-columns: 1fr;
    }

    .checkbox-grid {
        grid-template-columns: 1fr;
    }

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

    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .case-studies-grid {
        grid-template-columns: 1fr;
    }

    .service-detail {
        padding: 2rem;
    }

    .service-detail h2 {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .contact-cta h2,
    .consultation-benefits h2,
    .consultation-testimonials h2,
    .case-studies-stats h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .nav-container {
        padding: 0 1rem;
    }

    .hero-container {
        padding: 0 1rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-graphic {
        height: auto;
        min-height: 450px;
        padding-bottom: var(--space-4);
    }

    .hero-graphic.console-expanded {
        height: auto;
        min-height: 900px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .floating-cta {
        bottom: var(--space-4);
        right: var(--space-4);
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    /* Services Cards - Vertical Stack Mobile Implementation */
    .services-carousel-wrapper {
        position: relative;
        width: 100%;
        padding: 0 var(--space-4);
    }

    .services-carousel-wrapper .services-grid {
        display: flex;
        flex-direction: column;
        gap: var(--space-6);
        width: 100%;
    }

    .services-carousel-wrapper .service-card {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: var(--space-8) var(--space-6);
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        min-height: auto;
    }
    
    /* Make the card content properly sized within the card */
    .services-carousel-wrapper .service-card > * {
        width: 100%;
        max-width: 100%;
    }
    
    .services-carousel-wrapper .service-card .service-icon {
        margin-bottom: var(--space-6);
        transform: scale(1.2);
    }
    
    .services-carousel-wrapper .service-card h3 {
        margin: var(--space-4) 0;
        font-size: var(--text-2xl);
        font-weight: var(--font-bold);
    }
    
    .services-carousel-wrapper .service-card p {
        margin-bottom: var(--space-8);
        line-height: 1.7;
        font-size: var(--text-base);
        max-width: none;
        padding: 0;
    }
    
    .services-carousel-wrapper .service-card .btn {
        margin-top: auto;
        padding: var(--space-3) var(--space-6);
        font-size: var(--text-sm);
        min-width: 120px;
    }

    /* Hide Carousel Controls - No longer needed */
    .carousel-controls,
    .carousel-indicators {
        display: none !important;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 1.5rem;
    }
}

/* Hide carousel controls on desktop */
@media (min-width: 481px) {
    .carousel-controls,
    .carousel-indicators {
        display: none;
    }
}

/* Landscape mobile optimization */
@media (max-width: 900px) and (orientation: landscape) {
    .hero {
        min-height: 60vh;
        padding: var(--space-8) 0;
    }
    
    .hero-title {
        font-size: var(--text-3xl);
    }
    
    .hero-subtitle {
        font-size: var(--text-lg);
    }
    
    .hero-buttons {
        flex-direction: row;
        justify-content: center;
    }
    
    .hero-buttons .btn {
        width: auto;
        min-width: 200px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}