/* ==================================================
   RESPONSIVE CSS - Mobile-First Approach
   Musical Score Annotation Platform
   ================================================== */

/* Extra Small devices (phones, 576px and up) */
@media (max-width: 575.98px) {
  :root {
    --font-size-h1: 1.875rem;         /* 30px */
    --font-size-h2: 1.5rem;           /* 24px */
    --font-size-h3: 1.25rem;          /* 20px */
    --section-padding: 60px 0;
  }
  
  .container {
    padding: 0 1rem;
  }
  
  .hero {
    text-align: center;
    padding: 2rem 0;
  }
  
  .hero h1 {
    font-size: var(--font-size-h1);
    margin-bottom: 1rem;
  }
  
  .hero p {
    font-size: var(--font-size-base);
  }
  
  .navbar-brand {
    font-size: var(--font-size-base);
  }
  
  .service-card,
  .feature-item,
  .price-card,
  .team-member,
  .review-card,
  .casestudy-card,
  .process-step,
  .timeline-item,
  .career-card,
  .coreinfo-item {
    padding: 1.5rem;
    margin-bottom: 1.72rem;
  }
  
  .contact-form {
    padding: 2rem;
  }
  
  .section-title {
    margin-bottom: 2rem;
  }
  
  .section-title h2 {
    font-size: var(--font-size-h2);
  }
  
  .price-value {
    font-size: 2rem;
  }
  
  .team-member img {
    width: 100px;
    height: 100px;
  }
  
  .gallery-layout {
    grid-template-columns: 1fr;
  }
  
  .gallery-item img {
    height: 200px;
  }
  
  .blog-card img {
    height: 150px;
  }
  
  .process-step::before {
    width: 30px;
    height: 30px;
    font-size: var(--font-size-base);
  }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
  :root {
    --font-size-h1: 2rem;             /* 32px */
    --font-size-h2: 1.625rem;         /* 26px */
    --section-padding: 70px 0;
  }
  
  .hero {
    text-align: center;
  }
  
  .hero h1 {
    font-size: var(--font-size-h1);
  }
  
  .service-card,
  .feature-item,
  .price-card,
  .team-member {
    margin-bottom: 2rem;
  }
  
  .gallery-layout {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .contact-form {
    padding: 2.5rem;
  }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
  .hero {
    text-align: left;
  }
  
  .hero-content {
    padding-right: 2rem;
    padding-top: 100px;
}
  
  .service-card,
  .feature-item,
  .price-card {
    margin-bottom: 2rem;
  }
  
  .gallery-layout {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .team-member {
    margin-bottom: 2rem;
  }
  
  .navbar-collapse {
    background: white;
    box-shadow: var(--shadow-sm);
    border-radius: 8px;
    margin-top: 1rem;
    padding: 1rem;
  }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .hero-content {
    padding-right: 3rem;
    padding-top: 100px;
}
  
  .service-card,
  .feature-item,
  .price-card {
    margin-bottom: 2rem;
  }
  
  .gallery-layout {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .team-member {
    margin-bottom: 2rem;
  }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
  .hero-content {
    padding-right: 4rem;
    padding-top: 100px;
}
  
  .gallery-layout {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .container {
    max-width: var(--container-max-width);
  }
}

/* Navigation responsive behavior */
@media (max-width: 991.98px) {
  .navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
  }
  
  .navbar-toggler:focus {
    box-shadow: none;
  }
  
  .navbar-collapse {
    background: white;
    box-shadow: var(--shadow-md);
    border-radius: 8px;
    margin-top: 1rem;
    padding: 1rem;
  }
  
  .navbar-nav .nav-link {
    text-align: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e9f3ff;
  }
  
  .navbar-nav .nav-link:last-child {
    border-bottom: none;
  }
}

/* Hero section responsive images */
@media (max-width: 767.98px) {
  .hero .row {
    flex-direction: column-reverse;
  }
  
  .hero-image {
    margin-bottom: 2rem;
  }
  
  .hero-image img {
    width: 100%;
    height: auto;
    max-width: 300px;
    margin: 0 auto;
    display: block;
  }
}

/* Service cards responsive grid */
@media (max-width: 575.98px) {
  .services .row > div {
    margin-bottom: 1rem;
  }
}

@media (min-width: 576px) and (max-width: 767.98px) {
  .services .row > div {
    margin-bottom: 1.59rem;
  }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .services .row > div[class*="col-md-4"] {
    margin-bottom: 2rem;
  }
}

/* Features responsive layout */
@media (max-width: 575.98px) {
  .features .row > div {
    margin-bottom: 1rem;
  }
}

@media (min-width: 576px) and (max-width: 991.98px) {
  .features .row > div {
    margin-bottom: 1.63rem;
  }
}

/* Price plans responsive */
@media (max-width: 767.98px) {
  .price-card {
    margin-bottom: 2rem;
  }
  
  .price-card.featured {
    margin-top: 0;
  }
}

@media (min-width: 768px) {
  .price-card.featured {
    transform: scale(1.05);
    margin-top: -1rem;
  }
}

/* Team members responsive */
@media (max-width: 575.98px) {
  .team .row > div {
    margin-bottom: 1rem;
  }
}

@media (min-width: 576px) and (max-width: 991.98px) {
  .team .row > div {
    margin-bottom: 1.68rem;
  }
}

/* Reviews responsive */
@media (max-width: 767.98px) {
  .review-card {
    margin-bottom: 1.75rem;
  }
}

/* Process steps responsive */
@media (max-width: 575.98px) {
  .process-step {
    margin-bottom: 3rem;
  }
  
  .process-step::before {
    top: -10px;
  }
}

@media (min-width: 576px) and (max-width: 991.98px) {
  .process-step {
    margin-bottom: 2.70rem;
  }
}

/* Timeline responsive */
@media (max-width: 575.98px) {
  .timeline-item {
    margin-left: 1rem;
  }
  
  .timeline-item::before {
    left: -25px;
  }
}

@media (min-width: 576px) and (max-width: 767.98px) {
  .timeline-item {
    margin-left: 1.5rem;
  }
  
  .timeline-item::before {
    left: -22px;
  }
}

/* Contact form responsive */
@media (max-width: 575.98px) {
  .contact-form {
    padding: 1.5rem;
  }
  
  .contact-info {
    padding: 1.5rem;
    margin-top: 1.62rem;
  }
}

@media (min-width: 576px) and (max-width: 767.98px) {
  .contact-form {
    padding: 2rem;
  }
}

/* Blog cards responsive */
@media (max-width: 575.98px) {
  .blog-card {
    margin-bottom: 1.55rem;
  }
  
  .blog-card img {
    height: 150px;
  }
}

@media (min-width: 576px) and (max-width: 991.98px) {
  .blog-card {
    margin-bottom: 2rem;
  }
  
  .blog-card img {
    height: 180px;
  }
}

/* FAQ responsive */
@media (max-width: 575.98px) {
  .faq-question,
  .faq-answer {
    padding: 1rem;
  }
}

/* Footer responsive */
@media (max-width: 575.98px) {
  .footer {
    padding: 2rem 0 1rem;
  }
  
  .footer .row > div {
    margin-bottom: 1.67rem;
  }
  
  .footer h5 {
    font-size: var(--font-size-base);
  }
}

@media (min-width: 576px) and (max-width: 767.98px) {
  .footer .row > div {
    margin-bottom: 2rem;
  }
}

/* Utility classes for responsive spacing */
.mb-xs-1 { margin-bottom: 0.34rem !important; }
.mb-xs-2 { margin-bottom: 0.68rem !important; }
.mb-xs-3 { margin-bottom: 1rem !important; }
.mb-xs-4 { margin-bottom: 1.59rem !important; }
.mb-xs-5 { margin-bottom: 3rem !important; }

.mt-xs-1 { margin-top: 0.40rem !important; }
.mt-xs-2 { margin-top: 0.64rem !important; }
.mt-xs-3 { margin-top: 1rem !important; }
.mt-xs-4 { margin-top: 1.64rem !important; }
.mt-xs-5 { margin-top: 3rem !important; }

.p-xs-1 { padding: 0.25rem !important; }
.p-xs-2 { padding: 0.5rem !important; }
.p-xs-3 { padding: 1rem !important; }
.p-xs-4 { padding: 1.5rem !important; }
.p-xs-5 { padding: 3rem !important; }

/* Text alignment responsive */
@media (max-width: 575.98px) {
  .text-xs-center { text-align: center !important; }
  .text-xs-left { text-align: left !important; }
  .text-xs-right { text-align: right !important; }
}

@media (min-width: 576px) and (max-width: 767.98px) {
  .text-sm-center { text-align: center !important; }
  .text-sm-left { text-align: left !important; }
  .text-sm-right { text-align: right !important; }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .text-md-center { text-align: center !important; }
  .text-md-left { text-align: left !important; }
  .text-md-right { text-align: right !important; }
}

/* Hide/show elements responsively */
@media (max-width: 575.98px) {
  .d-xs-none { display: none !important; }
  .d-xs-block { display: block !important; }
  .d-xs-inline { display: inline !important; }
  .d-xs-inline-block { display: inline-block !important; }
  .d-xs-flex { display: flex !important; }
}

@media (min-width: 576px) and (max-width: 767.98px) {
  .d-sm-none { display: none !important; }
  .d-sm-block { display: block !important; }
  .d-sm-inline { display: inline !important; }
  .d-sm-inline-block { display: inline-block !important; }
  .d-sm-flex { display: flex !important; }
}

/* Responsive animations */
@media (max-width: 575.98px) {
  .fade-in,
  .slide-in-left,
  .slide-in-right {
    transform: none;
    opacity: 1;
  }
  
  .fade-in.visible,
  .slide-in-left.visible,
  .slide-in-right.visible {
    transform: none;
    opacity: 1;
  }
}

/* High contrast mode adjustments */
@media (prefers-contrast: high) {
  .service-card,
  .feature-item,
  .price-card,
  .team-member,
  .review-card,
  .casestudy-card,
  .process-step,
  .timeline-item,
  .career-card,
  .coreinfo-item,
  .contact-form,
  .blog-card,
  .faq-item {
    border: 2px solid #212020;
  }
  
  .btn-primary {
    border: 2px solid #fff;
  }
  
  .form-control {
    border: 2px solid #1c1c1c;
  }
  
  .form-control:focus {
    border-color: #000;
    box-shadow: 0 0 0 0.2rem rgba(0, 0, 0, 0.25);
  }
}

/* Dark mode support (for system preference) */

/* Print styles */
@media print {
  .navbar,
  .footer,
  .contact-form,
  .btn,
  .hero {
    display: none !important;
  }
  
  .section {
    padding: 20px 0;
    break-inside: avoid;
  }
  
  .service-card,
  .feature-item,
  .price-card,
  .team-member,
  .review-card,
  .casestudy-card,
  .process-step,
  .timeline-item,
  .career-card,
  .coreinfo-item,
  .blog-card,
  .faq-item {
    box-shadow: none;
    border: 1px solid #b5b5b5;
    margin-bottom: 15px;
    break-inside: avoid;
  }
  
  .gallery-item img {
    max-width: 100px;
    height: auto;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
  }
  
  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
  }
} 