/* =========================================
   RESPONSIVE CSS - All Devices
   NNTEN Interiors and Beddings
   ========================================= */

/* =========================================
   LARGE TABLETS & SMALL LAPTOPS (max-width: 1200px)
   ========================================= */
@media (max-width: 1200px) {
    .container {
        padding: 0 6%;
    }

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

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

    .about-container {
        gap: 3rem;
    }

    .portfolio-carousel .portfolio-item {
        flex: 0 0 380px;
    }
}

/* =========================================
   TABLETS - LANDSCAPE (max-width: 1024px)
   ========================================= */
@media (max-width: 1024px) {
    .section {
        padding: 80px 0;
    }

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

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

    .page-header {
        padding: 130px 0 60px;
    }

    .page-header h1 {
        font-size: 2.8rem;
    }

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

    .about-container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .about-image {
        order: -1;
    }

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

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

    .portfolio-carousel .portfolio-item {
        flex: 0 0 340px;
    }

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

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

    .footer-brand {
        grid-column: 1 / -1;
        padding-right: 0;
    }

    .curator-container {
        gap: 3rem;
    }

    .curator-text .quote {
        font-size: 1.3rem;
    }
}

/* =========================================
   TABLETS - PORTRAIT (max-width: 768px)
   ========================================= */
@media (max-width: 768px) {
    /* Navigation */
    .hamburger {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 2rem;
        box-shadow: none;
        transition: 0.6s cubic-bezier(0.85, 0, 0.15, 1);
        z-index: 1000;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        margin: 1.5rem 0;
        opacity: 0;
        transform: translateY(20px);
        transition: 0.4s ease forwards;
    }

    .nav-links.active li {
        opacity: 1;
        transform: translateY(0);
    }

    /* Staggered delay for menu items */
    .nav-links.active li:nth-child(1) { transition-delay: 0.1s; }
    .nav-links.active li:nth-child(2) { transition-delay: 0.2s; }
    .nav-links.active li:nth-child(3) { transition-delay: 0.3s; }
    .nav-links.active li:nth-child(4) { transition-delay: 0.4s; }
    .nav-links.active li:nth-child(5) { transition-delay: 0.5s; }

    .nav-links a {
        color: var(--text-dark) !important;
        font-size: 1.5rem;
        font-family: var(--font-heading);
        font-weight: 600;
    }

    .nav-links .btn-outline {
        margin-top: 1rem;
        width: auto;
        padding: 12px 40px;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
        background-color: var(--text-dark);
    }

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

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
        background-color: var(--text-dark);
    }

    /* Hero */
    .hero {
        min-height: 500px;
    }

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

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

    .hero-btns {
        flex-direction: column;
        gap: 0.75rem;
    }

    .hero-btns .btn {
        width: 100%;
        text-align: center;
    }

    /* Page Header */
    .page-header {
        padding: 120px 0 50px;
    }

    .page-header h1 {
        font-size: 2.2rem;
    }

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

    /* About */
    .about-text p {
        font-size: 1rem;
    }

    .about-image::before {
        top: -10px;
        left: -10px;
    }

    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .service-card {
        padding: 2rem 1.5rem;
    }

    /* Portfolio */
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .portfolio-grid .portfolio-item {
        max-height: 220px;
    }

    .portfolio-carousel .portfolio-item {
        flex: 0 0 300px;
        aspect-ratio: 4/3;
    }

    .portfolio-info h4 {
        font-size: 1.1rem;
    }

    /* Contact */
    .contact-form {
        padding: 2rem 1.5rem;
    }

    .contact-info h2 {
        font-size: 2rem;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .footer-brand {
        grid-column: 1 / -1;
        text-align: center;
        padding-right: 0;
    }

    .footer-brand .footer-logo {
        display: flex;
        justify-content: center;
    }

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

    .footer-tagline {
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }

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

    .footer-logo img {
        height: 50px;
    }

    /* Testimonials */
    .testimonials {
        padding: 60px 0;
    }

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

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

    /* CTA */
    .cta h2 {
        font-size: 1.8rem;
    }

    /* Curator Note */
    .curator-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3.5rem;
    }

    .curator-text .quote {
        padding-left: 0;
        font-size: 1.2rem;
    }

    .curator-text .quote::before {
        left: 50%;
        transform: translateX(-50%);
    }

    .curator-image {
        max-width: 400px;
        margin: 0 auto;
    }
}

/* =========================================
   LARGE PHONES (max-width: 576px)
   iPhone Plus, Samsung Galaxy S series, Pixel
   ========================================= */
@media (max-width: 576px) {
    .container {
        padding: 0 5%;
    }

    .section {
        padding: 60px 0;
    }

    /* Hero */
    .hero {
        min-height: 450px;
    }

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

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

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

    /* Page Header */
    .page-header {
        padding: 110px 0 40px;
    }

    .page-header h1 {
        font-size: 1.8rem;
    }

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

    /* Typography */
    .section-title {
        font-size: 1.6rem;
        margin-bottom: 1rem;
    }

    .subtitle {
        font-size: 0.75rem;
        letter-spacing: 1.5px;
    }

    /* About */
    .about-container {
        gap: 2rem;
    }

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

    .about-image::before {
        display: none;
    }

    /* Services */
    .service-card {
        padding: 1.75rem 1.25rem;
    }

    .service-icon {
        width: 55px;
        height: 55px;
    }

    .service-card h3 {
        font-size: 1.1rem;
    }

    .service-card p {
        font-size: 0.9rem;
    }

    /* Portfolio Grid */
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .portfolio-grid .portfolio-item {
        max-height: 180px;
        border-radius: 8px;
    }

    .portfolio-grid .portfolio-info h4 {
        font-size: 0.9rem;
    }

    .portfolio-grid .portfolio-info p {
        font-size: 0.7rem;
    }

    .portfolio-grid .portfolio-overlay {
        padding: 1rem;
    }

    /* Portfolio Carousel */
    .portfolio-carousel .portfolio-item {
        flex: 0 0 260px;
    }

    .portfolio-carousel-wrapper {
        padding: 1rem 0;
    }

    /* Contact */
    .contact-grid {
        gap: 2rem;
    }

    .contact-info h2 {
        font-size: 1.6rem;
    }

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

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 12px;
        font-size: 0.9rem;
    }

    .btn {
        padding: 10px 24px;
        font-size: 0.9rem;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 3rem 0 2rem;
    }

    .footer-brand {
        text-align: center;
    }

    .footer-links h4::after,
    .footer-contact h4::after {
        left: 0;
    }

    .footer-logo img {
        height: 45px;
    }

    .footer .social-links a {
        width: 36px;
        height: 36px;
    }

    /* CTA */
    .cta h2 {
        font-size: 1.5rem;
    }

    .cta p {
        font-size: 0.9rem;
    }
}

/* =========================================
   STANDARD PHONES (max-width: 480px)
   iPhone SE, iPhone 12/13/14, Galaxy A series
   ========================================= */
@media (max-width: 480px) {
    .hero {
        min-height: 420px;
    }

    .hero h1 {
        font-size: 1.75rem;
        line-height: 1.2;
    }

    .hero p {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }

    .hero-btns .btn {
        padding: 10px 20px;
        font-size: 0.85rem;
    }

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

    .page-header h1 {
        font-size: 1.6rem;
    }

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

    /* Portfolio */
    .portfolio-grid .portfolio-item {
        max-height: 160px;
    }

    .portfolio-carousel .portfolio-item {
        flex: 0 0 230px;
    }

    /* Contact */
    .detail-item {
        gap: 0.75rem;
    }

    .detail-icon {
        font-size: 1.25rem;
    }

    .detail-item h4 {
        font-size: 0.95rem;
    }

    .detail-item p {
        font-size: 0.85rem;
    }

    .contact-details {
        gap: 1rem;
    }

    /* Floating Buttons */
    .floating-btns {
        bottom: 20px;
        right: 20px;
        gap: 10px;
    }

    .floating-btn {
        width: 48px;
        height: 48px;
    }

    .floating-btn svg {
        width: 22px;
        height: 22px;
    }

    /* Navigation */
    .nav-links {
        width: 85%;
        max-width: 280px;
    }

    .logo img {
        height: 45px;
    }

    .navbar.scrolled .logo img {
        height: 38px;
    }
}

/* =========================================
   SMALL PHONES (max-width: 360px)
   iPhone SE (1st gen), Galaxy S mini, older devices
   ========================================= */
@media (max-width: 360px) {
    .container {
        padding: 0 4%;
    }

    .section {
        padding: 50px 0;
    }

    .hero {
        min-height: 380px;
    }

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

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

    .page-header {
        padding: 95px 0 30px;
    }

    .page-header h1 {
        font-size: 1.4rem;
    }

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

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

    /* Portfolio - single column on very small screens */
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .portfolio-grid .portfolio-item {
        max-height: 200px;
    }

    .portfolio-carousel .portfolio-item {
        flex: 0 0 200px;
    }

    /* Services */
    .service-card {
        padding: 1.5rem 1rem;
    }

    /* Contact */
    .contact-form {
        padding: 1.25rem 1rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px;
        font-size: 16px; /* Prevents iOS zoom on focus */
    }

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

    /* Footer */
    .footer-grid {
        padding: 2.5rem 0 1.5rem;
    }

    .footer-logo img {
        height: 40px;
    }

    .footer .social-links {
        gap: 0.75rem;
    }

    .footer .social-links a {
        width: 32px;
        height: 32px;
    }

    .footer .social-links a svg {
        width: 16px;
        height: 16px;
    }
}

/* =========================================
   LANDSCAPE ORIENTATION - PHONES
   ========================================= */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
        padding-top: 60px;
    }

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

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

    .hero-btns {
        flex-direction: row;
    }

    .page-header {
        padding: 90px 0 30px;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }

    .nav-links {
        width: 60%;
        max-width: 250px;
    }
}

/* =========================================
   HIGH DPI / RETINA DISPLAYS
   ========================================= */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .about-image img,
    .portfolio-item img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* =========================================
   TOUCH DEVICE OPTIMIZATIONS
   ========================================= */
@media (hover: none) and (pointer: coarse) {
    /* Always show portfolio overlay on touch devices */
    .portfolio-overlay {
        opacity: 1;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 60%);
    }

    .portfolio-info {
        transform: translateY(0);
    }

    /* Larger tap targets */
    .btn {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .nav-links a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .social-links a {
        min-width: 44px;
        min-height: 44px;
    }

    /* Remove hover effects that don't work on touch */
    .service-card:hover {
        transform: none;
    }

    .portfolio-item:hover img {
        transform: none;
    }
}

/* =========================================
   PRINT STYLES
   ========================================= */
@media print {
    .navbar,
    .hamburger,
    .hero-overlay,
    .social-links,
    .contact-form-wrapper,
    .portfolio-carousel-wrapper {
        display: none !important;
    }

    .hero {
        min-height: auto;
        padding: 2rem 0;
    }

    .section {
        padding: 2rem 0;
    }

    body {
        color: #000;
        background: #fff;
    }
}
