/* Responsive styles for dubrovin.kz - Mobile First approach */

/* Medium devices (tablets) */
@media (max-width: 768px) {
  /* Typography adjustments */
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.25rem; }
  
  .hero__title {
    font-size: 2.25rem;
  }
  
  .hero__description {
    font-size: 1.125rem;
  }
  
  /* Header mobile */
  .header__nav {
    display: none;
  }
  
  .header__content {
    position: relative;
  }
  
  .header__menu-toggle {
    display: flex;
    order: 2;
  }
  
  .theme-toggle {
    width: 36px;
    height: 36px;
    order: 1;
    margin-right: 0.5rem;
  }
  
  .header__logo {
    flex: 1;
    order: 0;
  }
  
  /* Hero section mobile */
  .hero {
    padding: calc(var(--header-height) + 2rem) 0 2rem;
  }
  
  .hero__content {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  
  .hero__avatar {
    width: 200px;
    height: 200px;
    object-position: 50% 25%;
  }
  
  .hero__actions {
    justify-content: center;
  }
  
  /* Sections mobile */
  section {
    padding: 3rem 0;
  }
  
  /* Services grid mobile */
  .services__grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  /* Portfolio grid mobile */
  .portfolio__grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  /* Donation mobile */
  .donation__content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .donation-form__amounts {
    grid-template-columns: 1fr 1fr;
  }
  
  /* Contact mobile */
  .contact__content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  /* Footer mobile */
  .footer__content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

/* Small devices (phones) */
@media (max-width: 480px) {
  /* Container adjustments */
  .container {
    padding: 0 0.75rem;
  }
  
  /* Typography for small screens */
  .hero__title {
    font-size: 1.875rem;
    line-height: 1.2;
  }
  
  .hero__description {
    font-size: 1rem;
  }
  
  .section-title {
    font-size: 1.5rem;
    margin-bottom: 2rem;
  }
  
  /* Hero mobile small */
  .hero {
    padding: calc(var(--header-height) + 1.5rem) 0 1.5rem;
  }
  
  .hero__avatar {
    width: 150px;
    height: 150px;
    object-position: 50% 25%;
  }
  
  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }
  
  /* Button adjustments */
  .btn {
    padding: 0.875rem 1.25rem;
    font-size: 0.95rem;
  }
  
  /* Form adjustments */
  .donation-form,
  .contact-form {
    padding: 1.5rem;
  }
  
  .donation-form__amounts {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  
  .amount-buttons {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .amount-btn {
    padding: 0.875rem;
  }
  
  /* Service cards mobile small */
  .service-card {
    padding: 1.5rem;
  }
  
  .service-card__icon {
    width: 56px;
    height: 56px;
    margin-bottom: 1rem;
  }
  
  .service-card__icon img {
    width: 28px;
    height: 28px;
  }
  
  /* Portfolio mobile small */
  .portfolio-item__content {
    padding: 1.25rem;
  }
  
  .tech-tag {
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
  }
  
  /* About section mobile */
  .about__intro {
    font-size: 1.125rem;
    margin-bottom: 2rem;
  }
  
  .about__details {
    gap: 1.5rem;
  }
  
  /* Contact methods mobile */
  .contact__methods {
    gap: 0.75rem;
    margin-top: 1.5rem;
  }
  
  .contact__link {
    padding: 0.625rem;
  }
  
  /* Mobile menu adjustments */
  .mobile-menu__nav {
    padding: 0.75rem;
    gap: 0.75rem;
  }
  
  .mobile-nav-link {
    padding: 0.75rem 0;
    font-size: 1.125rem;
  }
}

/* Very small devices */
@media (max-width: 320px) {
  .hero__title {
    font-size: 1.625rem;
  }
  
  .container {
    padding: 0 0.5rem;
  }
  
  .donation-form,
  .contact-form {
    padding: 1rem;
  }
  
  .service-card {
    padding: 1.25rem;
  }
}

/* Large devices (desktops) */
@media (min-width: 1024px) {
  /* Enhanced desktop experience */
  .hero__title {
    font-size: 3.5rem;
  }
  
  .hero__content {
    grid-template-columns: 1fr 350px;
    gap: 5rem;
  }
  
  .hero__avatar {
    width: 300px;
    height: 300px;
    object-position: 50% 25%;
  }
  
  .services__grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .portfolio__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
  }
  
  .donation__content,
  .contact__content {
    gap: 5rem;
  }
  
  /* Service card hover effects enhanced */
  .service-card:hover {
    transform: translateY(-6px);
  }
  
  /* Portfolio hover effects enhanced */
  .portfolio-item:hover {
    transform: translateY(-6px);
  }
}

/* Extra large devices */
@media (min-width: 1200px) {
  .hero__title {
    font-size: 4rem;
  }
  
  .hero__description {
    font-size: 1.375rem;
  }
  
  section {
    padding: 6rem 0;
  }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  /* Optimize for retina displays */
  .hero__avatar {
    image-rendering: -webkit-optimize-contrast;
    object-position: 50% 25%;
  }
}

/* Print styles */
@media print {
  * {
    background: transparent !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  
  .header,
  .mobile-menu,
  .footer,
  .donation,
  .hero__actions {
    display: none !important;
  }
  
  .hero {
    padding: 2rem 0;
  }
  
  section {
    padding: 2rem 0;
  }
  
  .btn {
    border: 1px solid black;
  }
  
  a::after {
    content: " (" attr(href) ")";
  }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  /* Keep smooth scroll for navigation - users can still benefit from smooth scroll */
  html {
    scroll-behavior: smooth;
  }
}
