/* ========================================
   RESPONSIVE CSS FOR FRONTEND
   ======================================== */

/* ========================================
   NEWS SECTION RESPONSIVE STYLES
   ======================================== */

/* Large Tablets and Small Desktops */
@media (max-width: 992px) {
    .news-section .section-title {
        font-size: var(--font-2xl);
    }
    
    .news-section .section-subtitle {
        font-size: var(--font-base);
    }
    
    .news-card {
        margin-bottom: var(--font-2xl);
    }
}

/* Tablets */
@media (max-width: 768px) {
    .news-section .section-title {
        font-size: var(--font-2xl);
    }
    
    .news-section .section-subtitle {
        font-size: 0.95rem;
    }
    
    .news-image {
        height: 180px;
    }
    
    .news-content {
        padding: 15px;
    }
    
    .news-title {
        font-size: var(--font-xl);
    }
    
    .news-excerpt {
        min-height: 50px;
        font-size: 0.95rem;
    }
    
    .news-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .news-date {
        font-size: 0.85rem;
    }
}

/* Large Mobile Phones */
@media (max-width: 576px) {
    .news-section {
        padding: var(--spacing-3xl) 0;
    }
    
    .news-section .section-title {
        font-size: 1.8rem;
    }
    
    .news-section .section-subtitle {
        font-size: 0.9rem;
    }
    
    .news-card {
        margin-bottom: var(--font-3xl);
    }
    
    .news-image {
        height: 160px;
    }
    
    .news-content {
        padding: 12px;
    }
    
    .news-title {
        font-size: var(--spacing-md);
        margin-bottom: 8px;
    }
    
    .news-excerpt {
        min-height: 45px;
        font-size: 0.9rem;
        margin-bottom: 12px;
    }
    
    .news-meta {
        gap: 8px;
    }
    
    .news-date {
        font-size: 0.8rem;
    }
}

/* Small Mobile Phones */
@media (max-width: 480px) {
    .news-section {
        padding: 2.5rem 0;
    }
    
    .news-section .section-title {
        font-size: 1.6rem;
    }
    
    .news-section .section-subtitle {
        font-size: 0.85rem;
    }
    
    .news-image {
        height: 140px;
    }
    
    .news-content {
        padding: 10px;
    }
    
    .news-title {
        font-size: 0.95rem;
    }
    
    .news-excerpt {
        min-height: var(--spacing-xl);
        font-size: 0.85rem;
    }
    
    .news-meta {
        gap: 6px;
    }
    
    .news-date {
        font-size: 0.75rem;
    }
    
    .btn-sm {
        font-size: 0.8rem;
        padding: 4px 8px;
    }
}

/* ========================================
   RESPONSIVE BREAKPOINTS
   ======================================== */

/* ========================================
   COURSES SECTION RESPONSIVE
   ======================================== */

/* Small Devices (768px and down) */
@media (max-width: 768px) {
    .section-title {
        font-size: var(--font-2xl);
    }
    
    .course-card-modern {
        margin-bottom: 20px;
    }
    
    .course-card-image {
        height: 150px;
    }
    
    .course-card-content {
        padding: 20px;
    }
    
    .course-title {
        font-size: var(--font-xl);
    }
    
    .course-card-footer {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

/* ========================================
   NEWS SECTION RESPONSIVE STYLES
   ======================================== */
@media (max-width: 768px) {
    .section-title {
        font-size: var(--font-2xl);
    }
    
    .news-card-modern {
        margin-bottom: 20px;
    }
    
    .news-card-image {
        height: 150px;
    }
    
    .news-card-content {
        padding: 20px;
    }
    
    .news-title {
        font-size: var(--font-xl);
    }
}

/* Extra Large Devices (1180px and up) */
@media (min-width: 1180px) {
    .modern-top-header {
        padding: var(--spacing-md) 0;
    }
    
    .top-header-container {
        max-width: 1400px;
    }
    
    .header-contact {
        gap: var(--spacing-2xl);
    }
    
    .header-actions {
        gap: var(--spacing-xl);
    }
    
    .contact-item {
        font-size: var(--font-base);
    }
    
    .contact-icon {
        width: 45px;
        height: 45px;
        font-size: var(--font-base);
    }
    
    .social-link {
        width: 48px;
        height: 48px;
        font-size: var(--font-3xl);
    }
}

/* Large Devices (992px - 1199px) */
@media (max-width: 1199.98px) {
    .modern-top-header {
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    .top-header-container {
        gap: var(--spacing-lg);
    }
    
    .header-contact {
        gap: var(--spacing-xl);
    }
    
    .header-actions {
        gap: var(--spacing-lg);
    }
    
    .contact-item {
        font-size: var(--font-sm);
        padding: var(--spacing-xs) var(--spacing-sm);
    }
    
    .contact-icon {
        width: var(--spacing-xl);
        height: var(--spacing-xl);
        font-size: var(--font-sm);
    }
    
    .quick-contact {
        gap: var(--spacing-sm);
    }
    
    .contact-link {
        padding: var(--spacing-xs) var(--spacing-md);
        font-size: var(--font-sm);
    }
    
    .social-link {
        width: 44px;
        height: 44px;
        font-size: var(--font-base);
    }
}

/* Medium Devices (768px - 991px) */
@media (max-width: 991.98px) {
    .modern-top-header {
        padding: var(--spacing-sm) var(--spacing-sm);
    }
    
    .top-header-container {
        flex-direction: column;
        gap: var(--spacing-md);
        text-align: center;
        padding: var(--spacing-md);
    }
    
    .top-header-content {
        flex-direction: column;
        gap: var(--spacing-lg);
        width: 100%;
    }
    
    .header-contact {
        order: 2;
        gap: var(--spacing-md);
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .header-actions {
        order: 1;
        justify-content: center;
        gap: var(--spacing-md);
        margin-bottom: var(--spacing-md);
    }
    
    .contact-item {
        font-size: var(--font-sm);
        /* flex-direction: column; */
        align-items: center;
        text-align: center;
        gap: var(--spacing-xs);
        padding: var(--spacing-xs) var(--spacing-sm);
    }
    
    .contact-icon {
        margin-bottom: var(--spacing-xs);
    }
    
    .contact-item span {
        font-size: var(--font-xs);
    }
    
    .quick-contact {
        flex-direction: column;
        gap: var(--spacing-sm);
        width: 100%;
    }
    
    .contact-link {
        width: 100%;
        justify-content: center;
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: var(--font-sm);
    }
    
    .social-links {
        justify-content: center;
        margin-left: 0;
        margin-top: var(--spacing-sm);
    }
    
    .social-link {
        width: var(--spacing-xl);
        height: var(--spacing-xl);
        font-size: var(--font-sm);
    }
    
    /* Hide floating actions on tablet and mobile */
    .floating-actions {
        display: none;
    }
    
    .floating-btn {
        width: 45px;
        height: 45px;
        font-size: var(--font-lg);
    }
}

/* Small Devices (576px - 767px) */
@media (max-width: 767.98px) {
    .modern-top-header {
        padding: 6px var(--spacing-xs);  /* Reduced from var(--spacing-sm) */
        min-height: 40px;  /* Add fixed minimum height */
    }
    
    .top-header-container {
        padding: 6px;  /* Reduced from var(--spacing-sm) */
    }
    
    .top-header-content {
        flex-direction: row;
        gap: var(--spacing-sm);
        width: 100%;
    }
    
    .header-contact {
        gap: var(--spacing-sm);
        flex-wrap: wrap;
        order: 1;
    }
    
    .header-actions {
        display: flex;
        gap: var(--spacing-sm);
        order: 2;
    }
    
    .contact-item {
        font-size: var(--font-xs);
        padding: var(--spacing-xs) var(--spacing-xs);
        min-width: calc(50% - var(--spacing-xs));
    }
    
    .contact-icon {
        width: 35px;
        height: 35px;
        font-size: var(--font-xs);
    }
    
    .quick-contact {
        display: none; /* Hide quick contact, use floating actions */
    }
    
    .social-links {
        gap: var(--spacing-xs);
        margin-left: 0;
        margin-top: var(--spacing-xs);
    }
    
    .social-link {
        width: 35px;
        height: 35px;
        font-size: var(--font-xs);
    }
    
    /* Keep floating actions hidden on small screens */
    .floating-actions {
        display: none;
    }
}

/* Extra Small Devices (575px and down) */
@media (max-width: 575.98px) {
    .modern-top-header {
        padding: 4px var(--spacing-xs);  /* Further reduced */
        min-height: 35px;  /* Smaller minimum height */
    }
    
    .top-header-container {
        gap: var(--spacing-xs);
        padding: 4px;  /* Further reduced */
    }
    
    .header-contact {
        gap: var(--spacing-xs);
        flex-wrap: wrap;
    }
    
    .contact-item {
        font-size: var(--font-xs);
        padding: var(--spacing-xs) var(--spacing-xs);
        min-width: calc(50% - var(--spacing-xs));
    }
    
    .contact-icon {
        width: 30px;
        height: 30px;
        font-size: var(--font-xs);
    }
    
    .contact-item span {
        display: none; /* Hide text, show only icons */
    }
    
    /* Add tooltip functionality */
    .contact-icon {
        position: relative;
        cursor: pointer;
    }
    
    .contact-icon::after {
        content: attr(data-tooltip);
        position: absolute;
        bottom: -30px;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(0, 0, 0, 0.9);
        color: white;
        padding: var(--spacing-xs) var(--spacing-sm);
        border-radius: var(--border-radius);
        font-size: var(--font-xs);
        white-space: nowrap;
        z-index: var(--z-tooltip);
        opacity: 0;
        transition: var(--transition-base);
        pointer-events: none;
    }
    
    .contact-item:hover .contact-icon::after {
        opacity: 1;
        pointer-events: auto;
    }
    
    .social-links {
        gap: var(--spacing-xs);
        margin-top: var(--spacing-xs);
    }
    
    .social-link {
        width: 30px;
        height: 30px;
        font-size: var(--font-xs);
    }
    
    .floating-actions {
        bottom: var(--spacing-md);
        right: var(--spacing-sm);
        gap: var(--spacing-xs);
    }
    
    .floating-btn {
        width: 35px;
        height: 35px;
        font-size: var(--font-sm);
    }
}

/* Ultra Small Devices (425px and down) */
@media (max-width: 425px) {
    .modern-top-header {
        padding: 5px var(--spacing-xs);
        min-height: auto;
    }
    
    .top-header-container {
        padding: 5px;
    }
    
    .top-header-content {
        flex-direction: column;
        gap: 5px;
        align-items: stretch;
        width: 100%;
    }
    
    .header-contact {
        gap: 5px;
        flex-direction: column;
        width: 100%;
        order: 1;
    }
    
    .contact-item {
        font-size: var(--font-xs);
        padding: 5px var(--spacing-xs);
        width: 100%;
        display: flex;
        align-items: center;
        gap: 8px;
        justify-content: flex-start;
    }
    
    .contact-icon {
        width: 20px;
        height: 20px;
        font-size: var(--font-xs);
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .contact-item span {
        display: block !important;
        font-size: 0.7rem;
        line-height: 1.2;
        white-space: normal;
        overflow: visible;
        flex: 1;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Ensure header-contact is visible */
    .header-contact {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Ensure contact items are visible */
    .contact-item {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .header-actions {
        gap: 5px;
        width: 100%;
        order: 2;
    }
    
    .social-links {
        display: flex;
        justify-content: center;
        gap: 10px;
        width: 100%;
        padding: 5px 0;
    }
    
    .social-link {
        width: 30px;
        height: 30px;
        font-size: var(--font-sm);
    }
    
    .floating-actions {
        bottom: var(--spacing-sm);
        right: var(--spacing-xs);
        gap: 5px;
    }
    
    .floating-btn {
        width: 30px;
        height: 30px;
        font-size: var(--font-xs);
    }
}

/* ========================================
   TESTIMONIALS SECTION RESPONSIVE STYLES
   ======================================== */

/* Medium Devices (992px and down) */
@media (max-width: 992px) {
    .testimonials-section {
        padding: 100px 0;
    }
    
    .testimonials-title {
        font-size: var(--spacing-3xl);
    }
    
    .testimonial-card {
        padding: var(--spacing-xl) 30px;
    }
    
    .testimonial-control {
        width: 50px;
        height: 50px;
        font-size: var(--spacing-md);
    }
    
    .testimonial-control.prev {
        left: -25px;
    }
    
    .testimonial-control.next {
        right: -25px;
    }
}

/* Small Devices (768px and down) */
@media (max-width: 768px) {
    .testimonials-section {
        padding: 80px 0;
    }
    
    .testimonials-title {
        font-size: 2.5rem;
    }
    
    .testimonials-subtitle {
        font-size: var(--font-xl);
    }
    
    .testimonial-card {
        padding: 30px 25px;
    }
    
    .testimonial-message {
        font-size: var(--font-lg);
    }
    
    .author-avatar {
        width: 70px;
        height: 70px;
    }
    
    .testimonial-controls {
        position: static;
        transform: none;
        justify-content: center;
        margin-top: 30px;
    }
    
    .testimonial-control {
        position: static;
        margin: 0 10px;
    }
    
    .testimonial-control.prev,
    .testimonial-control.next {
        left: auto;
        right: auto;
    }
}

/* Extra Small Devices (576px and down) */
@media (max-width: 576px) {
    .testimonials-container {
        padding: 0 15px;
    }
    
    .testimonials-title {
        font-size: var(--font-2xl);
    }
    
    .testimonial-card {
        padding: 25px 20px;
    }
    
    .testimonial-message {
        font-size: var(--spacing-md);
    }
    
    .author-avatar {
        width: 60px;
        height: 60px;
    }
    
    .author-name {
        font-size: var(--font-lg);
    }
    
    .author-position {
        font-size: 0.875rem;
    }
}

/* ========================================
   ORIENTATION AND SPECIAL DEVICES
   ======================================== */

/* Landscape Orientation */
@media (max-width: 991.98px) and (orientation: landscape) {
    .modern-top-header {
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    .header-contact {
        order: 1;
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .header-actions {
        order: 2;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .contact-icon,
    .social-link,
    .floating-btn {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Print Styles */
@media print {
    .modern-top-header,
    .floating-actions {
        display: none;
    }
}

/* Universities Page Responsive Styles */
@media (max-width: 768px) {
    .page-title {
        font-size: var(--font-3xl);
    }
    
    .university-card {
        margin-bottom: var(--spacing-2xl);
    }
    
    .university-card-header {
        padding: var(--spacing-2xl);
    }
    
    .university-logo {
        width: var(--spacing-6xl);
        height: var(--spacing-6xl);
    }
    
    .university-card-body {
        padding: var(--spacing-2xl);
    }
}

/* Universities Show Page Responsive Styles */
@media (max-width: 768px) {
    .page-title {
        font-size: var(--font-3xl);
    }
    
    .university-sidebar {
        position: relative;
        top: 0;
        margin-top: var(--spacing-2xl);
    }
    
    .university-detail-body {
        padding: var(--spacing-2xl);
    }
    
    .sidebar-info {
        padding: var(--spacing-2xl);
    }
}

/* Albums Page Responsive Styles */
@media (max-width: 768px) {
    .page-title {
        font-size: var(--font-4xl);
    }
    
    .page-subtitle {
        font-size: var(--font-base);
    }
    
    .album-cover {
        height: 180px;
    }
    
    .album-content {
        padding: var(--spacing-2xl);
    }
    
    .album-title {
        font-size: var(--font-lg);
    }
    
    .album-meta {
        flex-direction: column;
        gap: var(--spacing-sm);
        text-align: center;
    }
}

@media (max-width: 576px) {
    .page-header {
        padding: var(--spacing-6xl) 0;
    }
    
    .album-cover {
        height: 180px;
    }
    
    .album-content {
        padding: var(--spacing-lg);
    }
    
    .btn-album {
        padding: var(--spacing-sm) var(--spacing-2xl);
        font-size: var(--font-sm);
    }
}

/* ========================================
   ALBUMS SHOW PAGE RESPONSIVE STYLES
   ======================================== */

@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }
    
    .page-header-meta {
        flex-direction: column;
        gap: 1rem;
    }
    
    .gallery-title {
        font-size: 1.5rem;
    }
    
    .photo-image {
        height: 200px;
    }
    
    .modal-photo-navigation {
        padding: 0 0.5rem;
    }
    
    .btn-nav {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 576px) {
    .page-header {
        padding: 3rem 0;
    }
    
    .album-cover-wrapper {
        max-height: 250px;
    }
    
    .album-cover-overlay {
        padding: 2rem 1rem 1rem;
    }
    
    .album-cover-content h2 {
        font-size: 1.5rem;
    }
    
    .photo-image {
        height: 180px;
    }
    
    .modal-dialog {
        margin: 1rem;
    }
}
