/* ================================
   KONSCIO3D HOUSING - RESPONSIVE OPTIMIZATION
   Mobile-First Approach
   Priority: MOBILE → TABLET → DESKTOP
   ================================ */

/* ================================
   BASE MOBILE STYLES (< 768px)
   ================================ */

/* Container mobile */
.container {
    padding: 0 1rem;
    max-width: 100%;
}

/* Typography mobile */
body {
    font-size: 14px;
    line-height: 1.5;
}

h1 {
    font-size: 1.75rem !important;
    line-height: 1.2;
}

h2 {
    font-size: 1.5rem !important;
    line-height: 1.3;
}

h3 {
    font-size: 1.25rem !important;
}

h4 {
    font-size: 1.1rem !important;
}

p {
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

/* ================================
   NAVIGATION MOBILE
   ================================ */

.navbar .container {
    padding: 0.75rem 1rem;
}

.logo {
    font-size: 1.2rem !important;
}

.logo-image {
    height: 35px !important;
}

.nav-menu {
    position: fixed;
    left: -100%;
    top: 60px;
    flex-direction: column;
    background-color: rgba(255, 255, 255, 0.98);
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
    padding: 2rem 0;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
}

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

.nav-menu li {
    margin: 0.5rem 0;
}

.nav-link {
    padding: 1rem 1.5rem !important;
    display: block;
    font-size: 1.05rem !important;
}

.nav-btn {
    margin: 1rem auto !important;
    width: 80%;
    max-width: 250px;
    display: block !important;
    text-align: center;
    padding: 0.875rem 1.5rem !important;
}

.hamburger {
    display: block;
    cursor: pointer;
    z-index: 1001;
}

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

.hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    background-color: var(--color-dark);
}

/* ================================
   HERO SECTION MOBILE
   ================================ */

.hero {
    padding: 5rem 0 3rem !important;
    min-height: auto !important;
}

.hero h1 {
    font-size: 2rem !important;
    margin-bottom: 1.5rem !important;
}

.hero .subtitle {
    font-size: 1.1rem !important;
    margin-bottom: 2rem !important;
}

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

.hero-buttons .btn {
    width: 100%;
    padding: 1rem 1.5rem !important;
    font-size: 1rem !important;
}

/* ================================
   FEATURE CARDS MOBILE
   ================================ */

.features-grid,
.pillars-grid,
.tech-grid,
.benefits-grid,
.steps-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
}

.feature-card,
.pillar-card,
.tech-card,
.benefit-card,
.step-card {
    padding: 1.5rem !important;
}

.feature-icon,
.pillar-icon,
.tech-icon {
    width: 60px !important;
    height: 60px !important;
    font-size: 1.75rem !important;
}

/* ================================
   STATS SECTION MOBILE
   ================================ */

.stats-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
}

.stat-card {
    padding: 1.5rem !important;
}

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

.stat-label {
    font-size: 0.95rem !important;
}

/* ================================
   CTA SECTION MOBILE
   ================================ */

.cta-section {
    padding: 3rem 0 !important;
}

.cta-section h2 {
    font-size: 1.75rem !important;
    margin-bottom: 1.5rem !important;
}

.cta-section p {
    font-size: 1rem !important;
    margin-bottom: 2rem !important;
}

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

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

/* ================================
   FOOTER MOBILE
   ================================ */

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

.footer-section {
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-section:last-child {
    border-bottom: none;
}

.footer-section h4 {
    margin-bottom: 1rem !important;
}

.footer-links {
    text-align: center !important;
}

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

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

/* ================================
   FORMS MOBILE
   ================================ */

.form-group {
    margin-bottom: 1.25rem !important;
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
    padding: 0.875rem !important;
    font-size: 1rem !important;
}

textarea {
    min-height: 120px !important;
}

button[type="submit"],
.btn-submit {
    width: 100% !important;
    padding: 1rem !important;
    font-size: 1.1rem !important;
}

/* ================================
   TABLES MOBILE
   ================================ */

table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table thead {
    display: none;
}

table tbody,
table tr,
table td {
    display: block;
    width: 100%;
}

table tr {
    margin-bottom: 1rem;
    border: 1px solid var(--color-gray-light);
    border-radius: 8px;
    padding: 1rem;
}

table td {
    text-align: left;
    padding: 0.5rem 0;
    position: relative;
}

table td:before {
    content: attr(data-label);
    font-weight: 700;
    display: inline-block;
    margin-right: 0.5rem;
    color: var(--color-dark);
}

/* ================================
   IMAGES & MEDIA MOBILE
   ================================ */

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

.image-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
}

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

/* ================================
   SPACING MOBILE
   ================================ */

section {
    padding: 3rem 0 !important;
}

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

.section-title {
    font-size: 1.75rem !important;
    margin-bottom: 1rem !important;
}

.section-intro {
    font-size: 1rem !important;
}

/* ================================
   BUTTONS MOBILE
   ================================ */

.btn {
    padding: 0.875rem 1.75rem !important;
    font-size: 1rem !important;
}

.btn-large {
    padding: 1rem 2rem !important;
    font-size: 1.1rem !important;
}

.btn-small {
    padding: 0.625rem 1.25rem !important;
    font-size: 0.9rem !important;
}

/* ================================
   SPECIFIC PAGES MOBILE
   ================================ */

/* Technology Page */
.tech-comparison-table {
    overflow-x: auto;
}

.tech-features {
    grid-template-columns: 1fr !important;
}

/* Model Page */
.model-timeline {
    padding-left: 1rem !important;
}

.timeline-item {
    padding-left: 1.5rem !important;
}

/* Contact Page */
.contact-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
}

.contact-info {
    order: 2;
}

.contact-form {
    order: 1;
}

/* ================================
   UTILITIES MOBILE
   ================================ */

.text-center-mobile {
    text-align: center !important;
}

.hide-mobile {
    display: none !important;
}

.show-mobile {
    display: block !important;
}

.full-width-mobile {
    width: 100% !important;
}

.no-padding-mobile {
    padding: 0 !important;
}

.no-margin-mobile {
    margin: 0 !important;
}

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

@media (min-width: 768px) {
    /* Container tablet */
    .container {
        padding: 0 2rem;
        max-width: 720px;
    }
    
    /* Typography tablet */
    body {
        font-size: 15px;
    }
    
    h1 {
        font-size: 2.25rem !important;
    }
    
    h2 {
        font-size: 1.875rem !important;
    }
    
    h3 {
        font-size: 1.5rem !important;
    }
    
    /* Navigation tablet */
    .hamburger {
        display: none;
    }
    
    .nav-menu {
        position: static;
        flex-direction: row;
        width: auto;
        padding: 0;
        max-height: none;
        background-color: transparent;
        box-shadow: none;
    }
    
    .nav-menu li {
        margin: 0;
    }
    
    .nav-link {
        padding: 0.5rem 1rem !important;
        font-size: 0.95rem !important;
    }
    
    .nav-btn {
        margin: 0 !important;
        width: auto;
        display: inline-block !important;
    }
    
    /* Hero tablet */
    .hero h1 {
        font-size: 2.75rem !important;
    }
    
    .hero .subtitle {
        font-size: 1.25rem !important;
    }
    
    .hero-buttons {
        flex-direction: row;
        justify-content: center;
        gap: 1.5rem;
    }
    
    .hero-buttons .btn {
        width: auto;
    }
    
    /* Grids tablet */
    .features-grid,
    .pillars-grid,
    .tech-grid,
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 2rem !important;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    /* Footer tablet */
    .footer-content {
        grid-template-columns: repeat(2, 1fr) !important;
        text-align: left !important;
    }
    
    .footer-links {
        text-align: left !important;
    }
    
    .social-links {
        justify-content: flex-start !important;
    }
    
    /* Forms tablet */
    button[type="submit"],
    .btn-submit {
        width: auto !important;
        min-width: 200px;
    }
    
    /* Contact page tablet */
    .contact-grid {
        grid-template-columns: 1fr 1.5fr !important;
    }
    
    .contact-info {
        order: 1;
    }
    
    .contact-form {
        order: 2;
    }
    
    /* Tables tablet */
    table {
        display: table;
    }
    
    table thead {
        display: table-header-group;
    }
    
    table tbody,
    table tr,
    table td {
        display: table-row-group;
    }
    
    table tr {
        display: table-row;
        margin-bottom: 0;
        border: none;
        padding: 0;
    }
    
    table td {
        display: table-cell;
        padding: 0.75rem;
    }
    
    table td:before {
        display: none;
    }
    
    /* Spacing tablet */
    section {
        padding: 4rem 0 !important;
    }
    
    .section-header {
        margin-bottom: 3rem !important;
    }
}

/* ================================
   DESKTOP STYLES (1024px+)
   ================================ */

@media (min-width: 1024px) {
    /* Container desktop */
    .container {
        max-width: 960px;
        padding: 0 2rem;
    }
    
    /* Typography desktop */
    body {
        font-size: 16px;
    }
    
    h1 {
        font-size: 3rem !important;
    }
    
    h2 {
        font-size: 2.25rem !important;
    }
    
    h3 {
        font-size: 1.75rem !important;
    }
    
    /* Navigation desktop */
    .logo {
        font-size: 1.5rem !important;
    }
    
    .logo-image {
        height: 50px !important;
    }
    
    .nav-link {
        padding: 0.5rem 1.25rem !important;
        font-size: 1rem !important;
    }
    
    /* Hero desktop */
    .hero {
        padding: 8rem 0 6rem !important;
    }
    
    .hero h1 {
        font-size: 3.5rem !important;
    }
    
    .hero .subtitle {
        font-size: 1.5rem !important;
    }
    
    /* Grids desktop */
    .features-grid,
    .pillars-grid,
    .tech-grid,
    .benefits-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 2.5rem !important;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
    
    /* Footer desktop */
    .footer-content {
        grid-template-columns: repeat(4, 1fr) !important;
    }
    
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
    
    /* Spacing desktop */
    section {
        padding: 5rem 0 !important;
    }
}

/* ================================
   LARGE DESKTOP (1200px+)
   ================================ */

@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }
    
    h1 {
        font-size: 3.5rem !important;
    }
    
    h2 {
        font-size: 2.5rem !important;
    }
    
    .hero h1 {
        font-size: 4rem !important;
    }
    
    .hero .subtitle {
        font-size: 1.625rem !important;
    }
}

/* ================================
   LANDSCAPE ORIENTATION
   ================================ */

@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        min-height: auto !important;
        padding: 4rem 0 3rem !important;
    }
    
    .nav-menu {
        max-height: 70vh;
    }
}

/* ================================
   ACCESSIBILITY & PERFORMANCE
   ================================ */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Touch targets */
@media (hover: none) and (pointer: coarse) {
    .btn,
    button,
    a {
        min-height: 44px;
        min-width: 44px;
    }
}
