/* Responsive Design */

/* Large screens (1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1400px;
    }

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

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

/* Medium screens (992px to 1199px) */
@media (max-width: 1199px) {
    .hero-content {
        gap: 3rem;
    }

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

    .service-content {
        gap: 3rem;
    }

    .story-content {
        gap: 3rem;
    }
}

/* Small screens (768px to 991px) */
@media (max-width: 991px) {
    .nav-menu {
        position: fixed;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 2rem;
        box-shadow: var(--shadow-lg);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
        gap: 1rem;
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active .bar:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active .bar:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

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

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

    .hero-visual {
        width: 250px;
        height: 250px;
    }

    .construction-icon {
        font-size: 3rem;
    }

    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

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

    .service-content.reverse {
        direction: ltr;
    }

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

    .service-visual {
        width: 150px;
        height: 150px;
        font-size: 3rem;
    }

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

    .process-timeline::before {
        display: none;
    }

    .process-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .process-image {
        order: -1;
    }

    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }

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

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

    .story-visual {
        width: 150px;
        height: 150px;
        font-size: 3rem;
    }

    .values-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    .team-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    .certifications-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }

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

    .form-row {
        grid-template-columns: 1fr;
    }

    .modal-body {
        grid-template-columns: 1fr;
    }

    .modal-image {
        min-height: 200px;
    }

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

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

/* Extra small screens (576px to 767px) */
@media (max-width: 767px) {
    .container {
        padding: 0 15px;
    }

    .hero {
        padding: 100px 0 60px;
    }

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

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

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

    .hero-visual {
        width: 200px;
        height: 200px;
    }

    .construction-icon {
        font-size: 2.5rem;
    }

    .element {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }

    .page-header {
        padding: 100px 0 40px;
    }

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

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

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

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

    .services-preview,
    .services-detailed,
    .process,
    .projects-preview,
    .about-story,
    .values,
    .team,
    .certifications,
    .contact-section,
    .faq,
    .cta {
        padding: 60px 0;
    }

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

    .service-card {
        padding: 1.5rem;
    }

    .service-text h2 {
        font-size: 1.75rem;
    }

    .service-text p {
        font-size: 1rem;
    }

    .service-visual {
        width: 120px;
        height: 120px;
        font-size: 2.5rem;
    }

    .process-timeline {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .step-number {
        width: 70px;
        height: 70px;
        font-size: 1.5rem;
    }

    .process-layout {
        gap: 2rem;
    }

    .process-item {
        padding: 1rem;
    }

    .process-icon {
        width: 50px;
        height: 50px;
    }

    .process-num {
        font-size: 1.25rem;
    }

    .process-item-title {
        font-size: 1.125rem;
    }

    .step-number {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

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

    .project-image {
        height: 200px;
    }

    .project-placeholder {
        font-size: 2rem;
    }

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

    .filter-btn {
        width: 100%;
        max-width: 200px;
    }

    .story-title {
        font-size: 1.75rem;
    }

    .story-description {
        font-size: 1rem;
    }

    .story-visual {
        width: 120px;
        height: 120px;
        font-size: 2.5rem;
    }

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

    .value-card {
        padding: 1.5rem;
    }

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

    .member-photo {
        height: 200px;
    }

    .photo-placeholder {
        font-size: 3rem;
    }

    .certifications-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .cert-item {
        padding: 1.5rem;
    }

    .contact-form-container {
        padding: 1.5rem;
    }

    .form-title {
        font-size: 1.75rem;
    }

    .contact-info-card {
        padding: 1.5rem;
    }

    .info-title {
        font-size: 1.25rem;
    }

    .contact-map {
        height: 250px;
    }

    .map-placeholder i {
        font-size: 2rem;
    }

    .faq-question {
        padding: 1rem;
    }

    .faq-question h3 {
        font-size: 1rem;
    }

    .faq-item.active .faq-answer {
        padding: 0 1rem 1rem;
    }

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

    .cta-description {
        font-size: 1.125rem;
    }

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

    .stat-item {
        padding: 1rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .stat-label {
        font-size: 1rem;
    }

    .footer {
        padding: 40px 0 20px;
    }

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

    .social-links {
        justify-content: center;
    }

    .footer-bottom-links {
        flex-direction: column;
        gap: 1rem;
    }

    .partners {
        padding: 60px 0;
    }

    .partner-item {
        width: 160px;
        height: 100px;
    }

    .partner-logo {
        padding: 1rem;
    }

    .partner-logo i {
        font-size: 2rem;
    }

    .partner-logo span {
        font-size: 0.75rem;
    }
}

/* Very small screens (up to 575px) */
@media (max-width: 575px) {
    .hero-title {
        font-size: 1.75rem;
    }

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

    .hero-visual {
        width: 150px;
        height: 150px;
    }

    .construction-icon {
        font-size: 2rem;
    }

    .element {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .page-title {
        font-size: 1.75rem;
    }

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

    .service-text h2 {
        font-size: 1.5rem;
    }

    .story-title {
        font-size: 1.5rem;
    }

    .form-title {
        font-size: 1.5rem;
    }

    .cta-title {
        font-size: 1.75rem;
    }

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

    .stat-number {
        font-size: 2.5rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.875rem;
    }

    .btn-large {
        padding: 14px 28px;
        font-size: 1rem;
    }

    .service-card,
    .value-card,
    .cert-item,
    .contact-form-container,
    .contact-info-card {
        padding: 1rem;
    }

    .team-member .member-info {
        padding: 1rem;
    }

    .member-photo {
        height: 150px;
    }

    .photo-placeholder {
        font-size: 2.5rem;
    }

    .partner-item {
        width: 140px;
        height: 90px;
    }

    .partner-logo i {
        font-size: 1.75rem;
    }

    .partner-logo span {
        font-size: 0.7rem;
    }
}

/* Landscape orientation adjustments */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        padding: 80px 0 40px;
    }

    .hero-content {
        gap: 1rem;
    }

    .hero-title {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .hero-description {
        font-size: 0.875rem;
        margin-bottom: 1rem;
    }

    .hero-visual {
        width: 120px;
        height: 120px;
    }

    .construction-icon {
        font-size: 1.5rem;
    }

    .element {
        width: 30px;
        height: 30px;
        font-size: 0.875rem;
    }
}

/* Print styles */
@media print {

    .header,
    .nav-toggle,
    .hero-buttons,
    .cta,
    .footer {
        display: none;
    }

    .hero {
        padding: 20px 0;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .hero-visual {
        display: none;
    }

    .page-header {
        padding: 20px 0;
    }

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

    .btn {
        display: none;
    }

    .service-card,
    .value-card,
    .team-member,
    .cert-item {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }

    .contact-form {
        display: none;
    }

    .contact-info-container {
        grid-template-columns: 1fr;
    }

    .contact-map {
        display: none;
    }

    .faq-item {
        break-inside: avoid;
    }

    .faq-question {
        background: #f5f5f5;
    }

    .faq-answer {
        max-height: none !important;
        padding: 1rem 1.5rem !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0000ff;
        --primary-dark: #000080;
        --secondary-color: #ff8000;
        --accent-color: #008000;
        --text-dark: #000000;
        --text-light: #333333;
        --bg-light: #f0f0f0;
        --bg-white: #ffffff;
        --border-color: #666666;
    }

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

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

    .btn-outline {
        border: 2px solid var(--text-dark);
    }

    .service-card,
    .value-card,
    .team-member,
    .cert-item,
    .contact-form-container,
    .contact-info-card,
    .faq-item {
        border: 2px solid var(--border-color);
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .hero-visual,
    .construction-icon,
    .element,
    .service-card,
    .value-card,
    .team-member,
    .cert-item,
    .project-card {
        animation: none !important;
        transform: none !important;
    }

    .service-card:hover,
    .value-card:hover,
    .team-member:hover,
    .cert-item:hover,
    .project-card:hover {
        transform: none !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-dark: #f9fafb;
        --text-light: #d1d5db;
        --bg-light: #1f2937;
        --bg-white: #111827;
        --border-color: #374151;
    }

    body {
        background-color: var(--bg-white);
        color: var(--text-dark);
    }

    .header {
        background: #ffffff !important;
        border-bottom-color: rgba(11, 27, 58, 0.1);
    }

    .hero {
        background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    }

    .service-card,
    .value-card,
    .team-member,
    .cert-item,
    .contact-form-container,
    .contact-info-card,
    .faq-item {
        background: var(--bg-white);
        border-color: var(--border-color);
    }

    .form-input,
    .form-select,
    .form-textarea {
        background: var(--bg-white);
        border-color: var(--border-color);
        color: var(--text-dark);
    }

    .modal-content {
        background: var(--bg-white);
    }

    .nav-menu {
        background: var(--bg-white);
    }
}

/* Focus styles for accessibility */
.btn:focus,
.form-input:focus,
.form-select:focus,
.form-textarea:focus,
.nav-link:focus,
.filter-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 10000;
}

.skip-link:focus {
    top: 6px;
}

/* Screen reader only content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}