/* ===== RESPONSIVE DESIGN ===== */

/* ===== BREAKPOINTS ===== */
/*
  Mobile: < 768px
  Tablet: 768px - 1024px
  Desktop: > 1024px
*/

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

  /* Container Adjustments */
  .container {
    padding: 0 1.5rem;
  }

  /* Navigation */
  .nav {
    padding: 1rem 1.5rem;
  }

  .nav__menu {
    gap: 1.5rem;
  }

  /* Hero Section - Carousel */
  .hero__title {
    font-size: 2.5rem;
  }

  .hero__subtitle {
    font-size: 1.1rem;
  }

  .carousel__container {
    height: 100vh;
    width: 130%;
    left: -15%;
    padding: 0;
  }

  .carousel__item {
    height: 100vh;
    width: calc(20% - 4px);
  }

  .carousel__nav {
    width: 45px;
    height: 45px;
  }

  .carousel__nav--prev {
    left: 1rem;
  }

  .carousel__nav--next {
    right: 1rem;
  }

  /* Section Typography */
  .section-title {
    font-size: 2.2rem;
  }

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

  /* Gallery Grid */
  .gallery__grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
  }

  /* About Section */
  .about__content {
    gap: 3rem;
  }

  .about__stats {
    gap: 1.5rem;
  }

  /* Footer */
  .footer__content {
    gap: 1.5rem;
  }
}

/* ===== MOBILE STYLES (< 768px) ===== */
@media screen and (max-width: 768px) {

  /* Base Adjustments */
  html {
    font-size: 14px;
  }

  /* Container */
  .container {
    padding: 0 1rem;
  }

  /* Header & Navigation */
  .header {
    padding: 0;
  }

  .nav {
    padding: 0.5rem 1rem;
    position: relative;
  }

  .nav__logo h1 a {
    font-size: 1.3rem;
  }

  .nav__menu {
    position: fixed;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--bg-white);
    flex-direction: column;
    gap: 0;
    padding: 2rem 0;
    box-shadow: var(--shadow-medium);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
  }

  .nav__menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav__item {
    width: 100%;
  }

  .nav__link {
    display: block;
    text-align: center;
    padding: 1rem 2rem;
    border-radius: 0;
    border-bottom: 1px solid #eee;
  }

  .nav__link::after {
    display: none;
  }

  .nav__toggle {
    display: flex;
  }

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

  .nav__toggle.active span:nth-child(2) {
    opacity: 0;
  }

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

  /* Main Content */
  .main {
    margin-top: 50px;
  }

  /* Hero Section - Mobile Carousel */
  .hero {
    height: 100vh;
    min-height: 600px;
  }

  .hero__header {
    padding: 2rem 0 1.5rem;
  }

  .hero__title {
    font-size: 2rem;
    line-height: 1.2;
  }

  .hero__subtitle {
    font-size: 1rem;
  }

  .hero__carousel {
    padding: 1rem 0;
  }

  .carousel__container {
    height: 100vh;
    width: 130%;
    left: -15%;
    padding: 0;
  }

  .carousel__item {
    height: 100vh;
    width: calc(20% - 4px);
    transform: none;
  }

  .carousel__nav {
    width: 40px;
    height: 40px;
  }

  .carousel__nav--prev {
    left: 0.5rem;
  }

  .carousel__nav--next {
    right: 0.5rem;
  }

  .carousel__actions {
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
  }

  .carousel__btn {
    width: 100%;
    max-width: 250px;
    justify-content: center;
  }

  .btn {
    width: 100%;
    max-width: 250px;
    padding: 0.875rem 1.5rem;
  }

  /* Section Spacing */
  .portfolio-section,
  .about-section {
    padding: 60px 0;
  }

  .section-header {
    margin-bottom: 3rem;
  }

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

  .section-subtitle {
    font-size: 1rem;
    padding: 0 1rem;
  }

  /* Gallery */
  .gallery__filters {
    gap: 0.5rem;
    margin-bottom: 2rem;
  }

  .filter-btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }

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

  .gallery__item {
    aspect-ratio: 4/3;
  }

  .gallery__overlay {
    position: static;
    transform: none;
    background: rgba(0, 0, 0, 0.8);
    padding: 1rem;
  }

  .gallery__overlay h3 {
    font-size: 1.1rem;
  }

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

  /* About Section */
  .about__content {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .about__description {
    font-size: 1rem;
    text-align: left;
  }

  .about__stats {
    justify-content: center;
    gap: 2rem;
  }

  .stat__number {
    font-size: 1.8rem;
  }

  .stat__label {
    font-size: 0.85rem;
  }


  /* Footer */
  .footer {
    padding: 2rem 0 1rem;
  }

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

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

  .footer__bottom {
    font-size: 0.9rem;
    padding-top: 1.5rem;
  }
}

/* ===== SMALL MOBILE STYLES (< 480px) ===== */
@media screen and (max-width: 480px) {

  /* Base Adjustments */
  html {
    font-size: 13px;
  }

  /* Hero Section */
  .hero__title {
    font-size: 2rem;
  }

  .hero__subtitle {
    font-size: 1rem;
  }

  /* Section Typography */
  .section-title {
    font-size: 1.8rem;
  }

  /* Gallery */
  .gallery__filters {
    flex-direction: column;
    align-items: center;
  }

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

  /* About Stats */
  .about__stats {
    flex-direction: column;
    gap: 1rem;
  }

  /* Loading Screen */
  .loading-content p {
    font-size: 0.9rem;
  }

  .loading-spinner {
    width: 40px;
    height: 40px;
  }
}

/* ===== LARGE DESKTOP STYLES (> 1400px) ===== */
@media screen and (min-width: 1400px) {

  /* Container */
  :root {
    --container-max-width: 1400px;
  }

  /* Typography Scale Up */
  .hero__title {
    font-size: 4rem;
  }

  .hero__subtitle {
    font-size: 1.4rem;
  }

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

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

  /* Gallery Grid */
  .gallery__grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
  }

  /* About Section */
  .about__content {
    gap: 5rem;
  }
}

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

/* Reduce motion for users who prefer it */
@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;
  }

  .loading-spinner {
    animation: none;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.3);
    --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-heavy: 0 8px 30px rgba(0, 0, 0, 0.5);
  }

  .nav__link::after {
    height: 3px;
  }

  .filter-btn {
    border-width: 2px;
  }
}

/* Dark mode support (if implemented later) */
@media (prefers-color-scheme: dark) {
  /* Variables can be overridden here for dark mode */
  /* Currently keeping light theme as per design requirements */
}

/* ===== LANDSCAPE ORIENTATION ON MOBILE ===== */
@media screen and (max-width: 768px) and (orientation: landscape) {
  .hero {
    height: 100vh;
  }

  .hero__title {
    font-size: 2.2rem;
  }

  .nav__menu {
    padding: 1rem 0;
  }

  .nav__link {
    padding: 0.75rem 2rem;
  }
}

/* ===== HOVER STATES FOR TOUCH DEVICES ===== */
@media (hover: none) and (pointer: coarse) {
  /* Remove hover effects on touch devices */
  .gallery__item:hover {
    transform: none;
    box-shadow: var(--shadow-light);
  }

  .gallery__item:hover img {
    transform: none;
  }

  .gallery__overlay {
    position: static;
    transform: none;
    background: rgba(0, 0, 0, 0.8);
  }

  .btn--primary:hover {
    transform: none;
  }
}

/* ===== PRINT STYLES ===== */
@media print {
  .header,
  .nav,
  .hero__buttons,
  .gallery__filters,
  .footer {
    display: none !important;
  }

  .main {
    margin-top: 0;
  }

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

  .gallery__item {
    break-inside: avoid;
    margin-bottom: 1rem;
  }

  body {
    font-size: 12pt;
    line-height: 1.4;
    color: black;
    background: white;
  }
}