/* ===================================
   ITGUY.MY Responsive Styles
   Mobile-First Approach
   =================================== */

/* ===== MOBILE DEVICES (< 576px) ===== */
@media (max-width: 575.98px) {
    /* Typography */
    .section-title {
        font-size: 1.75rem;
    }
    
    .hero-section h1 {
        font-size: 1.75rem !important;
    }
    
    .hero-section .lead {
        font-size: 1rem;
    }
    
    /* Profile Image */
    .profile-img {
        width: 120px;
        height: 120px;
    }
    
    /* Credentials Strip */
    .credentials-strip {
        padding: 1rem;
    }
    
    .credentials-strip h5 {
        font-size: 1.1rem;
    }
    
    .credentials-strip p {
        font-size: 0.85rem;
        line-height: 1.6;
    }
    
    /* Sections Spacing */
    section {
        padding: 3rem 0;
    }
    
    /* Course Cards */
    .course-card {
        padding: 1.5rem;
    }
    
    .course-icon {
        width: 60px;
        height: 60px;
    }
    
    .course-icon i {
        font-size: 1.75rem;
    }
    
    .course-card h4 {
        font-size: 1.1rem;
        min-height: auto;
    }
    
    /* Why Cards */
    .why-card {
        padding: 1.5rem;
    }
    
    .why-icon {
        width: 70px;
        height: 70px;
    }
    
    .why-icon i {
        font-size: 2rem;
    }
    
    .why-card h4 {
        font-size: 1.2rem;
    }
    
    /* Stats */
    .stat-number {
        font-size: 2.5rem;
    }
    
    .stat-label {
        font-size: 0.85rem;
    }

    .stat-card {
        padding: 1.5rem 1rem;
    }
    
    /* Project Cards */
    .project-card img {
        height: 200px;
    }
    
    .project-overlay {
        padding: 1rem;
        transform: translateY(0);
    }
    
    .project-overlay h5 {
        font-size: 1rem;
    }
    
    .project-overlay p {
        font-size: 0.85rem;
    }
    
    /* Testimonials */
    .testimonial-card {
        padding: 1.5rem;
    }
    
    .quote-icon {
        width: 50px;
        height: 50px;
    }
    
    .quote-icon i {
        font-size: 1.2rem;
    }
    
    .testimonial-text {
        font-size: 0.95rem;
    }
    
    /* About Me */
    .about-profile-img {
        width: 180px;
        height: 180px;
    }
    
    .about-profile-img-large {
        width: 200px;
        height: 200px;
    }
    
    .about-badge {
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
    }
    
    /* Methodology */
    .methodology-card {
        padding: 2rem 1rem !important;
    }
    
    .methodology-icon {
        width: 70px;
        height: 70px;
    }
    
    .methodology-icon i {
        font-size: 2rem;
    }
    
    .methodology-step h4 {
        font-size: 1.2rem;
    }
    
    /* Experience Cards */
    .experience-header {
        flex-direction: column;
    }
    
    .experience-year {
        margin-top: 0.5rem;
        align-self: flex-start;
    }
    
    /* Timeline */
    .timeline-item {
        padding-left: 1.5rem;
        margin-left: 0.5rem;
    }
    
    /* Hero Stats */
    .hero-stat-number {
        font-size: 2rem;
    }
    
    .hero-stat-label {
        font-size: 0.8rem;
    }
    
    /* Hero Stats */
    .hero-stat-number {
        font-size: 2rem;
    }
    
    .hero-stat-icon {
        font-size: 1.5rem;
    }
    
    .hero-stat-icon i {
        font-size: 1.5rem;
    }

    .hero-stat-label {
        font-size: 0.75rem;
    }
    
    /* Coverage Cards */
    .coverage-card {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .coverage-icon {
        width: 60px;
        height: 60px;
    }
    
    .coverage-icon i {
        font-size: 2rem;
    }
    
    .coverage-card h4 {
        font-size: 1.2rem;
    }
    
    /* Client Badges */
    .client-badges {
        gap: 1rem;
    }
    
    .client-badge {
        min-width: 100px;
        padding: 1rem;
    }
    
    .client-badge i {
        font-size: 2rem;
    }
    
    /* Journey Timeline - Mobile */
    .journey-timeline::before {
        left: 20px;
    }
    
    .journey-item {
        flex-direction: row !important;
        padding-left: 60px;
    }
    
    .journey-year {
        width: 80px;
        height: 80px;
        font-size: 1.1rem;
        position: absolute;
        left: 0;
    }
    
    .journey-content {
        max-width: 100%;
        padding: 0 0 0 1rem;
        text-align: left !important;
    }
    
    .journey-item:nth-child(even) .journey-content {
        text-align: left !important;
    }
    
    /* Footer */
    .footer {
        text-align: center;
    }
    
    .footer .col-lg-4,
    .footer .col-lg-2,
    .footer .col-lg-3 {
        margin-bottom: 2rem;
    }
    
    .footer .text-md-end {
        text-align: center !important;
    }
    
    /* Contact Widget */
    .contact-widget {
        bottom: 20px;
        right: 20px;
    }
    
    .contact-widget-btn {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    /* Modal */
    .modal-body {
        padding: 1.5rem;
    }
    
    /* Buttons */
    .btn-lg {
        padding: 0.75rem 2rem;
        font-size: 1rem;
    }
}

/* ===== SMALL TABLETS (576px - 767px) ===== */
@media (min-width: 576px) and (max-width: 767.98px) {
    .section-title {
        font-size: 2rem;
    }
    
    .hero-section h1 {
        font-size: 2rem !important;
    }
    
    .profile-img {
        width: 150px;
        height: 150px;
    }
    
    .course-card h4 {
        min-height: 80px;
    }
    
    .project-card img {
        height: 250px;
    }
}

/* ===== TABLETS (768px - 991px) ===== */
@media (min-width: 768px) and (max-width: 991.98px) {
    .section-title {
        font-size: 2.25rem;
    }
    
    .hero-section h1 {
        font-size: 2.5rem !important;
    }
    
    .credentials-strip p {
        font-size: 0.95rem;
    }
    
    /* Course Grid - 2 columns */
    .course-card h4 {
        min-height: 70px;
    }
    
    /* Stats - 4 columns on tablet */
    .stat-card {
        padding: 1.5rem 0.5rem;
    }
    
    .stat-number {
        font-size: 3rem;
    }
    
    /* Footer - 2 column layout */
    .footer .col-md-6 {
        margin-bottom: 2rem;
    }
}

/* ===== DESKTOP (992px - 1199px) ===== */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .hero-section h1 {
        font-size: 2.75rem !important;
    }
    
    .course-card h4 {
        min-height: 65px;
    }
    
    .why-card {
        padding: 2rem 1.5rem;
    }
}

/* ===== LARGE DESKTOP (1200px+) ===== */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* ===== EXTRA LARGE DESKTOP (1400px+) ===== */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .hero-section h1 {
        font-size: 3.5rem !important;
    }
    
    .section-title {
        font-size: 2.75rem;
    }
}

/* ===== NAVIGATION RESPONSIVE ===== */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: rgba(18, 52, 86, 0.98);
        padding: 1rem;
        margin-top: 1rem;
        border-radius: 8px;
        box-shadow: var(--shadow-sm);
    }
    
    .navbar-dark .navbar-collapse {
        background: rgba(18, 52, 86, 0.98);
    }
    
    .navbar-light .navbar-collapse {
        background: var(--white);
    }
    
    .navbar-nav {
        gap: 0.5rem;
    }
    
    .navbar-dark .navbar-nav .nav-link,
    .navbar-light .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        border-radius: 8px;
    }
    
    .navbar-dark .navbar-nav .nav-link:hover {
        background: rgba(171, 205, 239, 0.1);
    }
    
    .navbar-light .navbar-nav .nav-link:hover {
        background: var(--bg-light);
    }
    
    .navbar-nav .nav-link::after {
        display: none;
    }
    
    .nav-item .btn {
        width: 100%;
        margin-top: 0.5rem;
    }
}

/* ===== TOUCH DEVICE OPTIMIZATION ===== */
@media (hover: none) and (pointer: coarse) {
    /* Increase tap targets */
    .btn {
        min-height: 48px;
        min-width: 48px;
    }
    
    .nav-link {
        min-height: 44px;
    }
    
    /* Remove hover effects on touch devices */
    .course-card:hover {
        transform: none;
    }
    
    .project-card:hover .project-overlay {
        transform: translateY(30%);
    }
    
    .project-card:hover img {
        transform: none;
    }
    
    /* Always show project overlay on mobile */
    .project-overlay {
        transform: translateY(0);
    }
}

/* ===== LANDSCAPE MOBILE ===== */
@media (max-width: 767.98px) and (orientation: landscape) {
    .hero-section {
        min-height: auto;
        padding: 3rem 0;
    }
    
    .hero-section .row {
        min-height: auto !important;
    }
    
    .profile-img {
        width: 100px;
        height: 100px;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .navbar,
    .contact-widget,
    .carousel-control-prev,
    .carousel-control-next,
    footer {
        display: none !important;
    }
    
    .hero-section {
        background: var(--white) !important;
        color: var(--text-dark) !important;
    }
    
    a {
        text-decoration: underline;
    }
    
    .course-card,
    .why-card,
    .testimonial-card {
        page-break-inside: avoid;
    }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* ===== BOOKING CALENDAR RESPONSIVE ===== */
@media (max-width: 575.98px) {
    .calendar-legend {
        justify-content: center;
        margin-top: 1rem;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .calendar-day {
        min-height: 70px;
        font-size: 0.75rem;
        padding: 0.3rem;
    }
    
    .day-number {
        font-size: 0.85rem;
    }
    
    .training-indicator {
        font-size: 0.65rem;
        padding: 0.25rem 0.4rem;
    }
    
    .training-name {
        font-size: 0.7rem;
    }
    
    .training-date-badge {
        padding: 0.75rem 0.5rem;
    }
    
    .date-day {
        font-size: 1.75rem;
    }
    
    .training-list-item h5 {
        font-size: 1rem;
    }
}

/* ===== HIGH CONTRAST MODE ===== */
@media (prefers-contrast: high) {
    .btn-outline-primary {
        border-width: 3px;
    }
    
    .course-card,
    .why-card,
    .testimonial-card {
        border: 2px solid var(--primary-dark);
    }
}
