/**
 * Responsive Styles for CollegeDekho XP Theme
 * Mobile-first approach with progressive enhancement
 */

/* ============================================
   LARGE DESKTOP (1400px+)
   ============================================ */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .article-title {
        font-size: 52px;
    }
    
    .article-body {
        font-size: 19px;
    }
}

/* ============================================
   DESKTOP (1200px - 1399px)
   ============================================ */
@media (min-width: 1200px) and (max-width: 1399.98px) {
    .container {
        max-width: 1140px;
    }
}

/* ============================================
   LAPTOP (992px - 1199px)
   ============================================ */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .container {
        max-width: 960px;
    }
    
    /* Header */
    .site-logo-premium .logo-brand-name {
        font-size: 24px;
    }
    
    .search-container input {
        font-size: 13px;
    }
    
    /* Article */
    .article-title {
        font-size: 42px;
    }
    
    .article-content-wrapper {
        padding: 40px;
    }
    
    /* Sidebar */
    .sidebar-widget {
        padding: 20px;
    }
}

/* ============================================
   TABLET (768px - 991px)
   ============================================ */
@media (min-width: 768px) and (max-width: 991.98px) {
    .container {
        max-width: 720px;
    }
    
    /* Header */
    .site-header {
        padding: 10px 0;
    }
    
    .navbar-nav .nav-link {
        padding: 10px 15px !important;
        font-size: 13px;
    }
    
    /* Hero Section */
    .hero-section {
        padding: 40px 0;
    }
    
    .hero-section h1 {
        font-size: 32px;
    }
    
    /* Article */
    .article-title {
        font-size: 36px;
    }
    
    .article-body {
        font-size: 17px;
    }
    
    .article-content-wrapper {
        padding: 35px;
    }
    
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    /* Sidebar */
    .article-sidebar {
        margin-top: 40px;
        position: static;
        max-height: none;
    }
    
    /* College Banner */
    .college-banner {
        flex-direction: column;
    }
    
    .college-stats-overlay {
        grid-template-columns: 1fr 1fr;
    }
    
    /* Footer */
    .footer-widget {
        margin-bottom: 30px;
    }
}

/* ============================================
   MOBILE LANDSCAPE (576px - 767px)
   ============================================ */
@media (min-width: 576px) and (max-width: 767.98px) {
    .container {
        max-width: 540px;
    }
    
    /* Header */
    .site-logo-premium .logo-brand-name {
        font-size: 22px;
    }
    
    .btn-counselling-cta {
        font-size: 13px;
        padding: 8px 16px !important;
    }
    
    /* Article */
    .article-title {
        font-size: 30px;
    }
    
    .article-body {
        font-size: 16px;
    }
    
    .article-content-wrapper {
        padding: 30px;
    }
    
    .author-avatar-large {
        width: 60px;
        height: 60px;
    }
    
    /* Cards */
    .card {
        margin-bottom: 20px;
    }
    
    /* Buttons */
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* ============================================
   MOBILE PORTRAIT (< 576px)
   ============================================ */
@media (max-width: 575.98px) {
    .container {
        max-width: 100%;
        padding-right: 15px;
        padding-left: 15px;
    }
    
    /* Typography */
    h1 {
        font-size: 24px;
    }
    
    h2 {
        font-size: 20px;
    }
    
    h3 {
        font-size: 18px;
    }
    
    /* Header */
    .top-contact-bar {
        display: none !important;
    }
    
    .site-header {
        padding: 8px 0;
    }
    
    .site-logo-premium .logo-brand-name {
        font-size: 18px;
    }
    
    .site-logo-premium .logo-icon-box {
        width: 36px;
        height: 36px;
    }
    
    .site-logo-premium .logo-icon-box i {
        font-size: 18px;
    }
    
    .btn-counselling-cta {
        font-size: 12px;
        padding: 6px 12px !important;
    }
    
    .btn-counselling-cta i {
        display: none;
    }
    
    /* Navigation */
    .navbar-nav .nav-link {
        padding: 12px 15px !important;
        font-size: 14px;
    }
    
    .navbar-collapse {
        margin-top: 10px;
    }
    
    /* Search */
    .search-container input {
        font-size: 13px;
        padding: 10px 15px;
    }
    
    .search-container button {
        padding: 10px 15px;
        font-size: 12px;
    }
    
    /* Article */
    .article-breadcrumb {
        font-size: 12px;
    }
    
    .article-content-wrapper {
        padding: 20px;
        border-radius: 12px;
    }
    
    .article-title {
        font-size: 24px;
        line-height: 1.3;
    }
    
    .article-body {
        font-size: 15px;
        line-height: 1.7;
    }
    
    .article-body h2 {
        font-size: 22px;
        margin-top: 2rem;
    }
    
    .article-body h3 {
        font-size: 18px;
    }
    
    .article-body h4 {
        font-size: 16px;
    }
    
    .article-body img {
        margin: 1.5rem 0;
    }
    
    .article-body table {
        font-size: 13px;
    }
    
    .article-body table th,
    .article-body table td {
        padding: 8px 10px;
    }
    
    /* Article Meta */
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .author-info {
        width: 100%;
    }
    
    .author-avatar-large {
        width: 50px;
        height: 50px;
    }
    
    .author-name {
        font-size: 15px;
    }
    
    .meta-item {
        font-size: 11px;
    }
    
    .meta-right {
        width: 100%;
        justify-content: flex-start;
    }
    
    .action-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    /* Featured Image */
    .article-featured-image {
        margin-bottom: 30px;
    }
    
    /* Tags */
    .tag-item {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    /* Share Buttons */
    .share-buttons {
        gap: 10px;
    }
    
    .share-btn-social {
        width: 42px;
        height: 42px;
        font-size: 16px;
    }
    
    /* Author Bio */
    .author-bio-card {
        padding: 25px;
    }
    
    .author-bio-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .author-bio-name {
        font-size: 18px;
    }
    
    /* Related Posts */
    .related-posts-title {
        font-size: 22px;
    }
    
    .related-post-card {
        margin-bottom: 20px;
    }
    
    /* Post Navigation */
    .nav-post-card {
        margin-bottom: 15px;
    }
    
    .nav-post-thumb {
        height: 100px;
    }
    
    .nav-post-title {
        font-size: 14px;
    }
    
    /* Sidebar */
    .article-sidebar {
        margin-top: 30px;
    }
    
    .sidebar-widget {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .widget-title {
        font-size: 16px;
    }
    
    .popular-post-title,
    .recent-post-title {
        font-size: 13px;
    }
    
    /* College Detail */
    .college-heading {
        font-size: 22px;
    }
    
    .college-section {
        padding: 20px;
    }
    
    .college-section h2 {
        font-size: 18px;
    }
    
    .college-cta-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .college-cta-buttons .btn {
        width: 100%;
    }
    
    .stat-value {
        font-size: 16px;
    }
    
    .college-banner-img {
        height: 200px;
    }
    
    .college-stats-overlay {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    /* Footer */
    .site-footer {
        padding: 30px 0;
    }
    
    .footer-widget {
        margin-bottom: 25px;
    }
    
    .footer-widget h6 {
        font-size: 16px;
    }
    
    .keywords-cloud {
        gap: 6px;
    }
    
    .keyword-tag {
        font-size: 11px;
        padding: 6px 10px;
    }
    
    .social-icon-large {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    /* Forms */
    .form-control {
        font-size: 14px;
        padding: 10px 12px;
    }
    
    .btn {
        padding: 10px 18px;
        font-size: 13px;
    }
    
    /* Modal */
    .modal-content {
        margin: 10px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    /* Cards */
    .card {
        margin-bottom: 15px;
    }
    
    .card-body {
        padding: 15px;
    }
    
    /* Sticky Share Bar */
    .sticky-share-bar {
        right: 10px;
        bottom: 15px;
    }
    
    .share-bar-content {
        padding: 6px;
    }
    
    .share-bar-btn {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }
}

/* ============================================
   EXTRA SMALL MOBILE (< 400px)
   ============================================ */
@media (max-width: 399.98px) {
    /* Ultra compact for very small screens */
    .container {
        padding-right: 10px;
        padding-left: 10px;
    }
    
    .article-content-wrapper {
        padding: 15px;
    }
    
    .article-title {
        font-size: 20px;
    }
    
    .article-body {
        font-size: 14px;
    }
    
    .sidebar-widget {
        padding: 15px;
    }
    
    .btn {
        padding: 8px 15px;
        font-size: 12px;
    }
    
    .share-bar-btn {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
}

/* ============================================
   LANDSCAPE ORIENTATION
   ============================================ */
@media (max-height: 500px) and (orientation: landscape) {
    /* Reduce vertical spacing in landscape */
    .article-content-wrapper {
        padding: 20px;
    }
    
    .article-title {
        font-size: 28px;
        margin-bottom: 15px;
    }
    
    .article-body {
        font-size: 15px;
    }
    
    .article-body h2 {
        margin-top: 1.5rem;
    }
    
    .sticky-share-bar {
        display: none;
    }
}

/* ============================================
   TOUCH DEVICE OPTIMIZATIONS
   ============================================ */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .nav-link {
        min-height: 44px;
    }
    
    .action-btn {
        width: 44px;
        height: 44px;
    }
    
    /* Remove hover effects on touch devices */
    .card:hover {
        transform: none;
    }
    
    .btn:hover {
        transform: none;
    }
    
    /* Larger form inputs */
    .form-control {
        min-height: 44px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* ============================================
   PRINT RESPONSIVE
   ============================================ */
@media print {
    /* Hide unnecessary elements */
    .sticky-share-bar,
    .action-btn,
    .share-buttons,
    .btn,
    header,
    footer,
    .sidebar,
    .navigation {
        display: none !important;
    }
    
    /* Optimize for print */
    .article-content-wrapper {
        padding: 0;
        box-shadow: none;
    }
    
    .article-body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    /* Prevent page breaks */
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
    
    img {
        page-break-inside: avoid;
    }
}

/* ============================================
   ACCESSIBILITY - REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .sticky-share-bar {
        transition: none;
    }
    
    .card:hover {
        transform: none;
    }
}

/* ============================================
   HIGH CONTRAST MODE
   ============================================ */
@media (prefers-contrast: high) {
    .btn {
        border: 2px solid currentColor;
    }
    
    .card {
        border: 2px solid currentColor;
    }
    
    a {
        text-decoration: underline;
    }
}

/* ============================================
   DARK MODE SUPPORT
   ============================================ */
@media (prefers-color-scheme: dark) {
    /* Optional: Add dark mode styles if needed */
    /* Currently theme uses light mode only */
}

/* === END RESPONSIVE STYLES === */
