/* Responsive Design CSS */

/* Extra Large Devices */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .video-card {
        transition: transform 0.3s ease;
    }
    
    .video-card:hover {
        transform: translateY(-8px);
    }
}

/* Large Devices (Desktops) */
@media (max-width: 1199.98px) {
    .video-title {
        font-size: 1.5rem;
    }
    
    .left-panel {
        flex: 0 0 58%;
    }
}

/* Medium Devices (Tablets) */
@media (max-width: 991.98px) {
    .navbar-nav {
        margin-top: 1rem;
        margin-bottom: 1rem;
    }
    
    .navbar-brand .brand-text {
        font-size: 1.1rem;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section .lead {
        font-size: 1rem;
    }
    
    .video-layout {
        flex-direction: column;
        height: auto;
    }
    
    .left-panel {
        flex: none;
        border-right: none;
        border-bottom: 1px solid var(--gray-200);
    }
    
    .right-panel {
        flex: none;
        min-height: 400px;
        max-height: 500px;
    }
    
    .resize-handle {
        display: none;
    }
    
    .video-detail-container {
        height: auto;
    }
    
    .content-tabs .nav-tabs {
        overflow-x: auto;
        white-space: nowrap;
        flex-wrap: nowrap;
    }
    
    .content-tabs .nav-item {
        flex-shrink: 0;
    }
}

/* Small Devices (Large Phones) */
@media (max-width: 767.98px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-section h1 {
        font-size: 1.75rem;
        margin-bottom: 1rem;
    }
    
    .hero-section .lead {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-section .d-flex {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .video-header .row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .video-header .col-md-4 {
        text-align: left !important;
    }
    
    .video-title {
        font-size: 1.25rem;
        line-height: 1.3;
    }
    
    .video-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .card-title {
        font-size: 1.1rem;
    }
    
    .feature-card {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .feature-icon {
        margin-bottom: 0.75rem;
    }
    
    .feature-icon i {
        font-size: 2rem !important;
    }
    
    .content-tabs .nav-tabs {
        padding: 0 0.5rem;
    }
    
    .subtitles-content,
    .content-container,
    .annotations-content {
        padding: 0.75rem;
    }
    
    .content-item {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .subtitle-item,
    .annotation-item {
        padding: 0.75rem;
        margin-bottom: 0.5rem;
    }
    
    .annotation-time {
        font-size: 0.8rem;
    }
    
    .annotation-title {
        font-size: 0.9rem;
    }
    
    .annotation-content {
        font-size: 0.8rem;
    }
    
    .dropdown-menu {
        min-width: 200px;
    }
    
    .btn-group-mobile {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn-group-mobile .btn {
        width: 100%;
    }
}

/* Extra Small Devices (Small Phones) */
@media (max-width: 575.98px) {
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .hero-section {
        padding: 1.5rem 0;
    }
    
    .hero-section h1 {
        font-size: 1.5rem;
    }
    
    .hero-section .hero-image {
        margin-top: 2rem;
    }
    
    .video-header {
        padding: 0.5rem 0;
    }
    
    .video-title {
        font-size: 1.1rem;
    }
    
    .navbar-brand {
        font-size: 1rem;
    }
    
    .navbar-brand img {
        height: 28px;
    }
    
    .card-body {
        padding: 0.75rem;
    }
    
    .card-footer {
        padding: 0.75rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .feature-card {
        padding: 1rem;
        text-align: center;
    }
    
    .feature-card h4 {
        font-size: 1.1rem;
    }
    
    .footer {
        text-align: center;
    }
    
    .footer .row > div {
        margin-bottom: 2rem;
    }
    
    .content-item {
        padding: 0.75rem;
    }
    
    .content-body {
        font-size: 0.9rem;
    }
    
    .content-body h1,
    .content-body h2,
    .content-body h3,
    .content-body h4,
    .content-body h5,
    .content-body h6 {
        font-size: 1.1rem;
        margin-top: 1.5rem;
    }
    
    .content-body table {
        font-size: 0.8rem;
    }
    
    .content-body th,
    .content-body td {
        padding: 0.5rem;
    }
    
    .search-form {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .search-form .form-control {
        margin-right: 0 !important;
        margin-bottom: 0.5rem;
    }
}

/* Landscape Orientation on Mobile */
@media (max-width: 767.98px) and (orientation: landscape) {
    .video-player-container {
        padding-bottom: 75%; /* Adjust for landscape */
    }
    
    .video-detail-container {
        height: 100vh;
    }
    
    .video-layout {
        flex-direction: row;
        height: 100%;
    }
    
    .left-panel {
        flex: 0 0 70%;
        border-right: 1px solid var(--gray-200);
        border-bottom: none;
    }
    
    .right-panel {
        flex: 1;
        min-height: auto;
        max-height: none;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .btn,
    .video-player-container,
    .resize-handle,
    .annotations-container {
        display: none !important;
    }
    
    .content-body {
        font-size: 12pt;
        line-height: 1.5;
        color: black;
    }
    
    .content-body a {
        color: black;
        text-decoration: underline;
    }
    
    .content-body a:after {
        content: " (" attr(href) ")";
        font-size: 10pt;
        color: #666;
    }
    
    .video-title {
        font-size: 18pt;
        font-weight: bold;
        margin-bottom: 12pt;
    }
    
    .page-break {
        page-break-before: always;
    }
}

/* High DPI Displays */
@media (min-resolution: 192dpi), (-webkit-min-device-pixel-ratio: 2) {
    .video-card img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Reduced Motion Preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .video-card:hover {
        transform: none;
    }
    
    .btn:hover {
        transform: none;
    }
}


/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 44px; /* iOS touch target */
        min-width: 44px;
    }
    
    .nav-link {
        padding: 0.75rem 1rem;
    }
    
    .dropdown-item {
        padding: 1rem;
    }
    
    .subtitle-item,
    .annotation-item {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .card {
        box-shadow: var(--shadow-md); /* More prominent on touch */
    }
    
    .video-card:hover {
        transform: none; /* Remove hover effects on touch */
    }
    
    .play-overlay {
        opacity: 1; /* Always visible on touch devices */
    }
} 