/* ============================================
   Oslo SEO - Responsive Stylesheet
   ============================================ */

/* Add top padding to body for fixed header */
body {
    padding-top: var(--header-height, 70px);
}

/* Main content must be below header dropdown */
main {
    position: relative;
    z-index: 1;
}

.hero,
section {
    position: relative;
    z-index: 1;
}

/* Container responsive */
.container {
    width: 100%;
    padding: 0 1.5rem;
}

@media (min-width: 576px) {
    .container { max-width: 540px; margin: 0 auto; }
}

@media (min-width: 768px) {
    .container { max-width: 720px; }
}

@media (min-width: 992px) {
    .container { max-width: 960px; }
}

@media (min-width: 1200px) {
    .container { max-width: 1140px; }
}

@media (min-width: 1400px) {
    .container { max-width: 1320px; }
}

/* ============================================
   HERO RESPONSIVE
   ============================================ */

@media (max-width: 991px) {
    .hero .container {
        flex-direction: column;
        text-align: center;
    }

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

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

    .hero-buttons {
        justify-content: center;
    }

    .hero-image {
        max-width: 400px;
        margin-top: 2rem;
    }
}

@media (max-width: 575px) {
    .hero {
        padding: 3rem 0 2rem;
    }

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

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

    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }

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

/* ============================================
   TYPOGRAPHY RESPONSIVE
   ============================================ */

@media (max-width: 767px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }
    h4 { font-size: 1.125rem; }
}

/* ============================================
   GRIDS RESPONSIVE
   ============================================ */

/* Services Grid */
@media (max-width: 575px) {
    .services-grid { grid-template-columns: 1fr; }
}

@media (min-width: 576px) and (max-width: 991px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Stats Grid */
@media (max-width: 767px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .stat-item h3 {
        font-size: 2rem;
    }
}

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

/* Testimonials Grid */
@media (max-width: 991px) {
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* Process Grid */
@media (max-width: 991px) {
    .process-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* Features Grid */
@media (max-width: 991px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    .feature-item {
        flex-direction: column;
        text-align: center;
    }
}

/* Footer Grid */
@media (max-width: 991px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

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

    .contact-list li {
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* ============================================
   SECTIONS RESPONSIVE
   ============================================ */

@media (max-width: 767px) {
    section {
        padding: 3rem 0;
    }

    .section-header {
        margin-bottom: 2rem;
    }

    .page-header {
        padding: 3rem 0 2rem;
    }

    .page-header p {
        font-size: 1rem;
    }
}

/* ============================================
   CARDS RESPONSIVE
   ============================================ */

@media (max-width: 575px) {
    .service-card {
        padding: 1.5rem;
    }

    .testimonial-card {
        padding: 1.5rem;
    }
}

/* ============================================
   CTA SECTION RESPONSIVE
   ============================================ */

@media (max-width: 767px) {
    .cta-section {
        padding: 3rem 0;
    }

    .cta-section h2 {
        font-size: 1.75rem;
    }

    .cta-section p {
        font-size: 1rem;
    }
}

/* ============================================
   GENERAL RESPONSIVE RULES
   ============================================ */

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

/* Prevent horizontal scroll - but allow mobile menu */
html {
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
}

body.menu-open {
    overflow: hidden;
}

/* Form elements full width on mobile */
input, textarea, select, button {
    max-width: 100%;
}

@media (max-width: 575px) {
    input, textarea, select {
        width: 100%;
    }

    .btn {
        width: 100%;
    }
}

/* ============================================
   SERVICE PAGE CONTENT
   ============================================ */

.service-content {
    padding: 4rem 0;
}

.service-content .container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 4rem;
}

.service-main h2 {
    margin-top: 2rem;
}

.service-main ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.service-main li {
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.service-sidebar {
    position: sticky;
    top: calc(var(--header-height) + 2rem);
    height: fit-content;
}

.sidebar-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.sidebar-card h4 {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-card ul {
    list-style: none;
}

.sidebar-card li {
    margin-bottom: 0.75rem;
}

.sidebar-card a {
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-card a:hover,
.sidebar-card a.active {
    color: var(--primary-color);
}

@media (max-width: 991px) {
    .service-content .container {
        grid-template-columns: 1fr;
    }

    .service-sidebar {
        position: static;
        order: -1;
    }
}

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

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

.blog-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.blog-card-image {
    height: 200px;
    background: var(--background-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

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

.blog-card h3 {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
}

.blog-card h3 a {
    color: var(--text-color);
}

.blog-card h3 a:hover {
    color: var(--primary-color);
}

.blog-card p {
    color: var(--text-light);
    font-size: 0.9375rem;
    margin-bottom: 1rem;
}

.blog-meta {
    font-size: 0.875rem;
    color: var(--text-light);
}

@media (max-width: 991px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* Blog Post Page */
.blog-post {
    padding: 4rem 0;
}

.blog-post .container {
    max-width: 800px;
}

.blog-post h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.blog-post-meta {
    color: var(--text-light);
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.blog-post-content {
    line-height: 1.8;
}

.blog-post-content h2 {
    margin-top: 2rem;
}

.blog-post-content h3 {
    margin-top: 1.5rem;
}

.blog-post-content p {
    margin-bottom: 1.5rem;
}

.blog-post-content ul,
.blog-post-content ol {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}

.blog-post-content li {
    margin-bottom: 0.5rem;
}

/* ============================================
   CONTACT PAGE
   ============================================ */

.contact-section {
    padding: 4rem 0;
}

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

.contact-info h3 {
    margin-bottom: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-item-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background-alt);
    border-radius: var(--border-radius-sm);
    color: var(--primary-color);
    flex-shrink: 0;
}

.contact-item h4 {
    margin-bottom: 0.25rem;
}

.contact-item p {
    color: var(--text-light);
    margin: 0;
}

.contact-form {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

@media (max-width: 767px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* ============================================
   404 PAGE
   ============================================ */

.error-page {
    min-height: calc(100vh - var(--header-height) - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 0;
}

.error-content h1 {
    font-size: 8rem;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 1rem;
}

.error-content h2 {
    margin-bottom: 1rem;
}

.error-content p {
    color: var(--text-light);
    margin-bottom: 2rem;
}

@media (max-width: 575px) {
    .error-content h1 {
        font-size: 5rem;
    }
}

/* ============================================
   ABOUT PAGE
   ============================================ */

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image {
    background: var(--background-alt);
    border-radius: var(--border-radius);
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

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

.team-card {
    text-align: center;
    padding: 2rem;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.team-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--background-alt);
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.team-card h3 {
    margin-bottom: 0.25rem;
}

.team-card p {
    color: var(--text-light);
}

@media (max-width: 991px) {
    .about-content {
        grid-template-columns: 1fr;
    }

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

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

/* ============================================
   CAROUSEL RESPONSIVE
   ============================================ */

@media (max-width: 767px) {
    .what-we-do-section {
        padding: 3rem 0;
    }

    .carousel-wrapper::before,
    .carousel-wrapper::after {
        width: 50px;
    }

    .carousel-item {
        padding: 0.75rem 1.25rem;
        font-size: 0.85rem;
    }

    .carousel-track {
        gap: 0.75rem;
    }
}

/* Popup Responsive */
@media (max-width: 767px) {
    .popup-overlay {
        padding: 1rem;
        align-items: flex-end;
    }

    .popup-container {
        max-height: 90vh;
        border-radius: 20px 20px 0 0;
    }

    .popup-content {
        padding: 2rem 1.5rem;
    }

    .popup-close {
        top: 1rem;
        right: 1rem;
        width: 36px;
        height: 36px;
        font-size: 1.25rem;
    }
}
