/* Comprehensive Responsive Design for All Screens */

/* Tablet Portrait (768px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero-text h1 { font-size: 2.5rem; }
    .about-content { gap: 2rem; }
    .faculty-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
    .message-card { grid-template-columns: 200px 1fr; gap: 2rem; padding: 3rem; }
    .leader-info img { width: 200px; height: 200px; }
    .about-grid { gap: 4rem; }
    .journey-grid { gap: 4rem; }
    .president-intro, .executive-intro, .vc-intro, .dean-intro { grid-template-columns: 280px 1fr; gap: 3rem; }
    .president-intro img, .executive-portrait img, .vc-portrait img, .dean-portrait img { width: 250px; height: 300px; }
}

/* Mobile Landscape (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .hero { padding: 3rem 1rem; }
    .hero h2 { font-size: 2rem; }
    .hero p { font-size: 1rem; }
    .faculty-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
    .faculty-photo { height: 160px; }
    .about-text h2 { font-size: 1.8rem; }
    .leadership-section h2 { font-size: 2.2rem; }
    .message-card { grid-template-columns: 1fr; padding: 2.5rem; }
    .modal-faculty-content { padding: 2.5rem; }
    .about-text-block, .vision-mission { padding: 2.5rem; }
    .president-intro, .executive-intro, .vc-intro, .dean-intro { grid-template-columns: 1fr; gap: 2rem; text-align: center; }
    .journey-grid { grid-template-columns: 1fr; gap: 3rem; }
    .message-header h2 { font-size: 2.8rem; }
}

/* Mobile Portrait (320px - 480px) */
@media (max-width: 480px) {
    .hero { padding: 2rem 1rem; }
    .hero h2 { font-size: 1.8rem; }
    .hero p { font-size: 0.9rem; }
    .faculty-directory { padding: 1.5rem 1rem; }
    .faculty-grid { gap: 1.5rem; grid-template-columns: 1fr; }
    .faculty-photo { height: 140px; }
    .faculty-content { padding: 1.2rem; }
    .faculty-content h3 { font-size: 1.2rem; }
    .position { font-size: 0.95rem; }
    .department { font-size: 0.8rem; }
    .contact p { font-size: 0.8rem; }
    
    .modal-content { width: 95%; margin: 2% auto; }
    .modal-faculty-content { padding: 1.5rem; }
    .modal-faculty-header { gap: 1rem; flex-direction: column; text-align: center; }
    .modal-faculty-photo img { width: 120px; height: 150px; }
    .modal-faculty-info h2 { font-size: 1.3rem; }
    
    .about-text h2 { font-size: 1.5rem; }
    .about-text p { font-size: 0.9rem; }
    .leadership-section h2 { font-size: 1.8rem; }
    .message-card { padding: 1.5rem; }
    .leader-info img { width: 100px; height: 100px; }
    .message-content p { font-size: 0.9rem; }
    
    .about-text-block, .vision-mission { padding: 1.5rem; }
    .about-text-block h2 { font-size: 1.6rem; }
    .about-text-block h3 { font-size: 1.2rem; }
    .vision-mission h3 { font-size: 1.2rem; }
    
    .president-details h1, .executive-details h1, .vc-details h1, .dean-details h1 { font-size: 1.8rem; }
    .executive-details .title, .vc-details .title, .dean-details .title { font-size: 1.1rem; }
    .message-header h2 { font-size: 1.8rem; }
    .milestone { padding: 1.5rem; }
    .milestone h3 { font-size: 1.1rem; }
    .story-content p { font-size: 0.9rem; }
    .sanskrit-quote p { font-size: 1.2rem; }
    .sanskrit-closing p { font-size: 1.1rem; }
    .president-intro img, .executive-portrait img, .vc-portrait img, .dean-portrait img { width: 200px; height: 240px; }
}

/* Large Desktop (1440px+) */
@media (min-width: 1440px) {
    .faculty-grid { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2rem; }
    .about-content { max-width: 1400px; margin: 0 auto; }
    .messages-grid { max-width: 1300px; }
    .journey-grid { max-width: 1500px; }
    .hero-text h1 { font-size: 3.5rem; }
    .about-text h2 { font-size: 2.5rem; }
    .leadership-section h2 { font-size: 3.2rem; }
}

/* Ultra-wide screens (1920px+) */
@media (min-width: 1920px) {
    .faculty-directory { max-width: 1800px; }
    .faculty-grid { grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 2.5rem; }
    .hero-content { max-width: 1600px; }
    .about-content { max-width: 1600px; }
    .hero-text h1 { font-size: 4rem; }
    .hero-text p { font-size: 1.4rem; }
}

/* Height-based responsive adjustments */
@media (max-height: 600px) and (orientation: landscape) {
    .hero-section { min-height: 80vh; padding: 3rem 2rem; }
    .hero { padding: 2rem 0; }
    .modal-content { max-height: 90vh; }
    .president-hero, .executive-hero, .vc-hero, .dean-hero { padding: 3rem 0; }
}

/* Small height screens */
@media (max-height: 500px) {
    .hero { padding: 1.5rem 0; }
    .hero h2 { font-size: 1.8rem; }
    .modal-content { max-height: 95vh; }
}

/* Print styles */
@media print {
    .navbar, .mobile-toggle, .hero-buttons, .btn-primary, .btn-secondary, .btn-cta, .modal { display: none !important; }
    .hero-section, .hero { background: none !important; color: #000 !important; }
    .faculty-member, .message-card { break-inside: avoid; }
    .faculty-grid { grid-template-columns: repeat(2, 1fr); }
    body { font-size: 12pt; line-height: 1.4; }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .faculty-photo img, .modal-faculty-photo img, .leader-info img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Accessibility - Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .element { animation: none; }
    .impact-circle { animation: none; }
    .faculty-member:hover { transform: none; }
}

/* Touch devices */
@media (hover: none) and (pointer: coarse) {
    .faculty-member:hover { transform: translateY(-4px); }
    .nav-link:hover { transform: none; }
    .dropdown-parent:hover .dropdown { opacity: 0; visibility: hidden; }
}

/* Specific device breakpoints */
/* iPhone SE and similar small phones */
@media (max-width: 375px) {
    .faculty-content { padding: 1rem; }
    .faculty-content h3 { font-size: 1.1rem; }
    .modal-faculty-content { padding: 1rem; }
    .about-text-block, .vision-mission { padding: 1.2rem; }
}

/* iPad and similar tablets */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
    .faculty-grid { grid-template-columns: repeat(2, 1fr); }
    .about-grid { grid-template-columns: 1fr; }
    .message-card { grid-template-columns: 1fr; }
}

@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .faculty-grid { grid-template-columns: repeat(3, 1fr); }
    .hero-section { min-height: 70vh; }
}

/* Foldable devices */
@media (min-width: 280px) and (max-width: 653px) {
    .faculty-grid { grid-template-columns: 1fr; }
    .faculty-photo { height: 120px; }
    .hero h2 { font-size: 1.5rem; }
    .hero p { font-size: 0.8rem; }
}