/**
 * İpek Ersan Portfolio - Comprehensive Responsive Styles
 * Professional Mobile-First Approach
 */

/* =====================================================
   BASE MOBILE STYLES (Applied first, then overridden)
   ===================================================== */

/* Ensure all filter buttons show text */
.filter-btn-premium,
.gallery-filter-btn-premium {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.filter-btn-premium span,
.gallery-filter-btn-premium span {
    display: inline !important;
    white-space: nowrap;
}

/* =====================================================
   TABLET LANDSCAPE (1024px - 1200px)
   ===================================================== */
@media (max-width: 1200px) {
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }

    .section {
        padding: 100px 0;
    }

    .section-about-home .about-visual-col {
        margin-bottom: 3rem;
    }

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

    .floating-stat-card {
        transform: scale(0.9);
    }

    .floating-stat-card.card-1 {
        top: -5%;
        right: 5%;
    }

    .floating-stat-card.card-2 {
        bottom: 10%;
        left: 5%;
    }

    .projects-grid-premium {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }

    .gallery-masonry-premium {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }

    .footer-grid {
        gap: 2rem;
    }
}

/* =====================================================
   TABLET PORTRAIT (768px - 1024px)
   ===================================================== */
@media (max-width: 1024px) {

    /* Navbar */
    .navbar-nav {
        background: rgba(13, 13, 13, 0.98);
        backdrop-filter: blur(20px);
        padding: 2rem;
        margin-top: 1rem;
        border-radius: 16px;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-link {
        padding: 1rem 0 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav-link:last-child {
        border-bottom: none;
    }

    .nav-social {
        margin-left: 0;
        margin-top: 1.5rem;
        justify-content: center;
        padding-top: 1.5rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .hero-content {
        padding: 0 1.5rem;
    }

    /* About section - stack layout */
    .section-about-home .row {
        flex-direction: column;
    }

    .about-visual-col,
    .about-text-col {
        width: 100%;
        max-width: 100%;
    }

    .about-image-wrapper {
        max-width: 350px;
    }

    .about-text-wrapper {
        text-align: center;
        padding-top: 2rem;
    }

    .section-badge {
        margin: 0 auto 1rem;
    }

    .about-title,
    .about-description {
        text-align: center;
    }

    .about-highlights,
    .about-cta {
        justify-content: center;
    }

    .section-header-fancy {
        margin-bottom: 2.5rem;
    }

    .section-title-large {
        font-size: clamp(1.75rem, 5vw, 2.5rem);
    }

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

    /* Homepage project cards - TABLET */
    .projects-grid-home {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .project-card-home .card-visual {
        height: 180px;
    }

    /* Filter buttons - TABLETS */
    .filter-container,
    .gallery-filter-premium {
        padding: 0 1rem;
        width: 100%;
    }

    .filter-inner,
    .gallery-filter-premium {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
    }

    .filter-btn-premium,
    .gallery-filter-btn-premium {
        padding: 0.75rem 1.25rem;
        font-size: 0.7rem;
        flex: 0 0 auto;
    }

    .gallery-masonry-premium {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

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

    .page-hero-premium {
        min-height: 50vh;
        padding: 120px 0 60px;
    }

    .page-title-premium {
        font-size: clamp(2rem, 8vw, 3.5rem);
    }

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

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

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

    .footer-links ul {
        text-align: center;
    }

    .scroll-indicator {
        bottom: 3%;
    }
}

/* =====================================================
   MOBILE LANDSCAPE / SMALL TABLETS (600px - 768px)
   ===================================================== */
@media (max-width: 768px) {
    body {
        font-size: 15px;
    }

    .container {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .section {
        padding: 70px 0;
    }

    .hero {
        min-height: 100svh;
    }

    .hero-content {
        padding: 0 1rem;
    }

    .hero-stats {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .hero-stat {
        min-width: auto;
    }

    .hero-stat-divider {
        display: none;
    }

    .floating-stat-card {
        display: none;
    }

    .about-image-wrapper {
        max-width: 300px;
    }

    .image-frame {
        padding: 0.5rem;
    }

    .frame-corner {
        width: 30px;
        height: 30px;
    }

    .about-roles {
        justify-content: center;
    }

    .about-highlights {
        flex-direction: column;
        gap: 1rem;
    }

    .highlight-item {
        width: 100%;
        justify-content: center;
    }

    .projects-grid-premium {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }

    .project-card-premium {
        border-radius: 16px;
    }

    /* Filter buttons - MOBILE */
    .filter-container,
    .gallery-filter-premium {
        padding: 0 0.5rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .filter-inner,
    .gallery-filter-premium {
        display: flex;
        flex-wrap: nowrap;
        gap: 0.5rem;
        justify-content: flex-start;
        padding-bottom: 0.5rem;
    }

    .filter-btn-premium,
    .gallery-filter-btn-premium {
        flex: 0 0 auto;
        padding: 0.6rem 1rem;
        font-size: 0.65rem;
        white-space: nowrap;
    }

    .filter-btn-premium span,
    .gallery-filter-btn-premium span {
        display: inline !important;
    }

    .gallery-masonry-premium {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .gallery-item-premium {
        border-radius: 12px;
    }

    .gallery-item-premium.large {
        grid-column: span 1;
        grid-row: span 1;
    }

    /* Homepage project cards - MOBILE */
    .projects-grid-home {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        max-width: 400px;
        margin: 2rem auto 0;
    }

    .project-card-home .card-visual {
        height: auto;
        aspect-ratio: 4/5;
    }

    .project-card-home .card-visual img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .project-card-home .card-title {
        font-size: 1rem;
    }

    .project-card-home .card-role {
        font-size: 0.8rem;
    }

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

    .contact-form-premium,
    .contact-info-premium {
        padding: 2rem 1.5rem;
    }

    .page-hero-premium {
        min-height: 40vh;
        padding: 100px 0 50px;
    }

    .page-title-premium {
        font-size: clamp(1.75rem, 10vw, 2.5rem);
    }

    .page-subtitle-premium {
        font-size: 0.9rem;
    }

    .footer-content {
        padding: 3rem 0 2rem;
    }

    .footer-grid {
        gap: 2rem;
    }

    .footer-logo {
        font-size: 1.5rem;
    }

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

/* =====================================================
   MOBILE PORTRAIT (480px and below)
   ===================================================== */
@media (max-width: 480px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .section {
        padding: 50px 0;
    }

    .section-title {
        font-size: 1.25rem;
        letter-spacing: 0.1em;
    }

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

    .section-eyebrow {
        font-size: 0.6rem;
    }

    .hero {
        padding: 80px 0 40px;
    }

    .hero-title .title-line {
        font-size: clamp(1.5rem, 12vw, 2.5rem);
    }

    .hero-subtitle-top {
        display: none;
    }

    .hero-tagline {
        font-size: 0.55rem;
        letter-spacing: 0.15em;
    }

    .hero-cta {
        margin-top: 1.5rem;
    }

    .btn-hero-primary,
    .btn-hero-outline {
        min-width: 100%;
        padding: 0.875rem 1.25rem;
        font-size: 0.6rem;
    }

    .hero-stats {
        background: transparent;
        padding: 0;
    }

    .hero-stat-num {
        font-size: 1.5rem;
    }

    .hero-stat-label {
        font-size: 0.5rem;
    }

    .scroll-indicator {
        display: none;
    }

    .about-image-wrapper {
        max-width: 260px;
    }

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

    .about-description {
        font-size: 0.9rem;
    }

    .role-tag {
        font-size: 0.6rem;
        padding: 0.4rem 0.8rem;
    }

    .project-card-premium .card-visual {
        aspect-ratio: 3/4;
    }

    .card-content {
        padding: 1rem;
    }

    .card-title {
        font-size: 1rem;
    }

    .card-role {
        font-size: 0.75rem;
    }

    /* Filter buttons - SMALL MOBILE */
    .filter-btn-premium,
    .gallery-filter-btn-premium {
        padding: 0.5rem 0.875rem;
        font-size: 0.6rem;
    }

    .gallery-masonry-premium {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .gallery-item-premium {
        border-radius: 12px;
    }

    .contact-form-premium,
    .contact-info-premium {
        padding: 1.5rem;
        border-radius: 16px;
    }

    .form-control {
        padding: 0.875rem 1rem;
        font-size: 0.9rem;
    }

    .page-hero-premium {
        min-height: 35vh;
        padding: 90px 0 40px;
    }

    .hero-decoration {
        display: none;
    }

    .footer-content {
        padding: 2.5rem 0 1.5rem;
    }

    .footer-logo {
        font-size: 1.25rem;
    }

    .footer-description {
        font-size: 0.85rem;
    }

    .footer-copyright {
        font-size: 0.7rem;
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* =====================================================
   EXTRA SMALL DEVICES (360px and below)
   ===================================================== */
@media (max-width: 360px) {
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .hero-title .title-line {
        font-size: 1.5rem;
    }

    .hero-tagline {
        display: none;
    }

    .btn-hero-primary,
    .btn-hero-outline {
        font-size: 0.55rem;
        padding: 0.75rem 1rem;
    }

    .section {
        padding: 40px 0;
    }

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

    .navbar .brand-text {
        font-size: 1rem;
        letter-spacing: 0.2em;
    }

    /* Filter buttons remain visible with text */
    .filter-btn-premium,
    .gallery-filter-btn-premium {
        padding: 0.4rem 0.6rem;
        font-size: 0.55rem;
    }
}

/* =====================================================
   LANDSCAPE ORIENTATION FIXES
   ===================================================== */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 80px 0 60px;
    }

    .hero-stats {
        display: none;
    }

    .hero-cta {
        flex-direction: row;
        margin-top: 1rem;
    }

    .btn-hero-primary,
    .btn-hero-outline {
        width: auto;
        min-width: 140px;
    }

    .page-hero-premium {
        min-height: auto;
        padding: 80px 0 40px;
    }

    .scroll-indicator {
        display: none;
    }
}

/* =====================================================
   TOUCH DEVICE OPTIMIZATIONS
   ===================================================== */
@media (hover: none) and (pointer: coarse) {
    .project-card-premium:hover {
        transform: none;
    }

    .gallery-item-premium:hover .item-overlay {
        opacity: 0;
    }

    .btn-hero-primary:hover,
    .btn-hero-outline:hover {
        transform: none;
    }

    .nav-link {
        padding: 1rem 0.5rem !important;
    }

    .filter-btn-premium,
    .gallery-filter-btn-premium {
        min-height: 44px;
    }

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

/* =====================================================
   PRINT STYLES
   ===================================================== */
@media print {

    .hero,
    .hero-social,
    .scroll-indicator,
    .navbar,
    .footer,
    .floating-stat-card,
    .hero-particles,
    .section-glow-bg,
    .floating-elements {
        display: none !important;
    }

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

    .section {
        padding: 2rem 0;
    }
}