/* =====================================
   RESPONSIVE CSS - MOBILE FIRST
   Carbon-negative Concrete R&D Firm
   ===================================== */

/* Mobile First - Base Styles (up to 576px) */
/* Already defined in main.css */

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
    
    .hero-title {
        font-size: 2.35rem;
    }
    
    .hero-subtitle {
        font-size: 1.21rem;
    }
    
    .section-title {
        font-size: 1.98rem;
    }
    
    .services-item-image {
        height: 220px;
    }
    
    .team-member-photo {
        width: 120px;
        height: 120px;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
    
    /* Navigation */
    .navbar-brand {
        font-size: 1.37rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 1.5rem;
    }
    
    /* Hero Section */
    .hero-title {
        font-size: 2.64rem;
    }
    
    .hero-subtitle {
        font-size: 1.30rem;
    }
    
    .hero-desc {
        font-size: 1.14rem;
    }
    
    /* Section Spacing */
    section {
        padding: 100px 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .section-subtitle {
        font-size: 1.31rem;
    }
    
    /* Services Grid */
    .services-item {
        margin-bottom: 2.98rem;
    }
    
    .services-item-image {
        height: 250px;
    }
    
    /* Team Members */
    .team-member {
        margin-bottom: 2.63rem;
    }
    
    .team-member-photo {
        width: 160px;
        height: 160px;
    }
    
    /* Cards */
    .card {
        margin-bottom: 2rem;
    }
    
    .card-body {
        padding: 2.5rem;
    }
    
    /* Contact Form */
    .contact-form {
        padding: 2.5rem;
    }
    
    /* Gallery */
    .gallery-item img {
        height: 300px;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
    
    /* Navigation */
    .navbar-brand {
        font-size: 1.56rem;
    }
    
    /* Hero Section */
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.53rem;
    }
    
    .hero-desc {
        font-size: 1.34rem;
    }
    
    /* Section Spacing */
    section {
        padding: 120px 0;
    }
    
    .section-title {
        font-size: 2.61rem;
    }
    
    .section-subtitle {
        font-size: 1.53rem;
    }
    
    /* Services Grid */
    .services-item-image {
        height: 280px;
    }
    
    /* Team Members */
    .team-member-photo {
        width: 180px;
        height: 180px;
    }
    
    /* Cards */
    .card-body {
        padding: 3rem;
    }
    
    /* Contact Form */
    .contact-form {
        padding: 3rem;
    }
    
    /* Gallery */
    .gallery-item img {
        height: 350px;
    }
    
    /* Footer */
    .footer {
        padding: 4rem 0 2rem;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    /* Hero Section */
    .hero-title {
        font-size: 3.53rem;
    }
    
    .hero-subtitle {
        font-size: 1.81rem;
    }
    
    .hero-desc {
        font-size: 1.43rem;
    }
    
    /* Section Spacing */
    section {
        padding: 140px 0;
    }
    
    .section-title {
        font-size: 3rem;
    }
    
    .section-subtitle {
        font-size: 1.83rem;
    }
    
    /* Services Grid */
    .services-item-image {
        height: 320px;
    }
    
    /* Team Members */
    .team-member-photo {
        width: 200px;
        height: 200px;
    }
    
    /* Gallery */
    .gallery-item img {
        height: 400px;
    }
}

/* Extra extra large devices (1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    /* Hero Section */
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 2rem;
    }
    
    .hero-desc {
        font-size: 1.58rem;
    }
    
    /* Section Spacing */
    section {
        padding: 160px 0;
    }
    
    .section-title {
        font-size: 3.63rem;
    }
    
    .section-subtitle {
        font-size: 2rem;
    }
}

/* Mobile Navigation Adjustments */
@media (max-width: 767px) {
    /* Navigation */
    .navbar-brand {
        font-size: 1.22rem;
    }
    
    .navbar-nav {
        text-align: center;
        padding: 1rem 0;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid var(--light-gray);
    }
    
    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }
    
    /* Hero Section */
    .hero-section {
        min-height: 80vh;
        text-align: center;
    }
    
    .hero-section::before {
        display: none;
    }
    
    .hero-title {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .hero-desc {
        font-size: 0.91rem;
        margin-bottom: 1.80rem;
    }
    
    /* Section Spacing */
    section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 1.80rem;
        margin-bottom: 0.90rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .section-desc {
        font-size: 1.02rem;
        margin-bottom: 2rem;
    }
    
    /* Services Grid */
    .services-item {
        margin-bottom: 1.78rem;
    }
    
    .services-item-image {
        height: 180px;
    }
    
    .services-item-name {
        font-size: 1rem;
    }
    
    .services-item-desc {
        font-size: 0.91rem;
    }
    
    .services-item-price {
        font-size: 1.22rem;
    }
    
    /* Team Members */
    .team-member {
        margin-bottom: 1.74rem;
    }
    
    .team-member-photo {
        width: 100px;
        height: 100px;
    }
    
    .team-member-name {
        font-size: 0.91rem;
    }
    
    .team-member-role {
        font-size: 0.77rem;
    }
    
    /* Cards */
    .card {
        margin-bottom: 1.70rem;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .card-title {
        font-size: 1.15rem;
    }
    
    .card-text {
        font-size: 1.02rem;
    }
    
    /* Contact Form */
    .contact-form {
        padding: 1.5rem;
    }
    
    .form-control {
        padding: 0.625rem;
        font-size: 1.02rem;
    }
    
    /* FAQ */
    .faq-question {
        font-size: 0.98rem;
    }
    
    .faq-answer {
        font-size: 0.81rem;
    }
    
    /* Gallery */
    .gallery-item {
        margin-bottom: 0.96rem;
    }
    
    .gallery-item img {
        height: 200px;
    }
    
    /* Footer */
    .footer {
        padding: 2rem 0 1rem;
        text-align: center;
    }
    
    .footer h5 {
        margin-bottom: 1.03rem;
    }
    
    .footer p,
    .footer a {
        font-size: 0.88rem;
    }
}

/* Tablet Portrait Adjustments */
@media (min-width: 768px) and (max-width: 991px) {
    /* Services Grid - 2 columns */
    .services-grid .col-md-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    /* Team Grid - 2 columns */
    .team-grid .col-md-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    /* Gallery - 2 columns */
    .gallery-grid .col-md-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .btn {
        padding: 1rem 2.5rem;
        font-size: 1rem;
    }
    
    .navbar-nav .nav-link {
        padding: 1rem 1.5rem;
    }
    
    .form-control {
        padding: 1rem;
        font-size: 1rem;
    }
    
    /* Remove hover effects on touch devices */
    .card:hover {
        transform: none;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    }
}

/* Print Styles */
@media print {
    * {
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
    
    .hero-section,
    .navbar,
    .footer {
        display: none;
    }
    
    .container {
        max-width: none;
        width: 100%;
    }
    
    section {
        padding: 20px 0;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .card,
    .btn,
    .navbar-nav .nav-link {
        transition: none;
    }
    
    .card:hover {
        transform: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-green: #235852;
        --primary-gray: #262323;
        --primary-blue: #1e3553;
        --light-white: #ffffff;
        --dark-gray: #000000;
    }
    
    .btn {
        border-width: 2px;
    }
    
    .form-control {
        border-width: 2px;
    }
    
    .card {
        border: 2px solid var(--dark-gray);
    }
}

/* Focus Styles for Accessibility */
.btn:focus,
.form-control:focus,
.navbar-nav .nav-link:focus {
    outline: 2px solid var(--primary-green);
    outline-offset: 2px;
}

/* Skip Link for Screen Readers */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-green);
    color: var(--light-white);
    padding: 8px;
    text-decoration: none;
    z-index: 9999;
    border-radius: 4px;
}

.skip-link:focus {
    top: 6px;
} 

.hero-content {
    padding-top: 275px;
}