/* assets/css/responsive.css - Responsive & Media Queries */

/* Tablet and Mobile Styles */
@media (max-width: 768px) {
    /* Mobile Hero Section Fixes */
    .main-content {
        padding-top: 70px; /* Reduced from 80px to eliminate gap */
    }
    
    .hero-section {
        min-height: 70vh; /* Adjusted for mobile */
        padding: 1rem 0; /* Reduced padding */
    }
    
    .hero-content h1 {
        font-size: 2.2rem; /* Slightly smaller than original 2.5rem */
        margin-bottom: 1rem; /* Reduced margin */
        line-height: 1.2;
        text-align: center; /* Center on mobile */
    }
    
    .hero-content .lead {
        font-size: 1rem; /* Reduced from 1.1rem */
        margin-bottom: 1.5rem; /* Reduced margin */
        line-height: 1.4;
    }
    
    /* Smaller and better positioned hero icon */
    .hero-image-placeholder {
        width: 200px !important; /* Reduced from 300px */
        height: 200px !important; /* Reduced from 300px */
        margin: 1rem auto; /* Added top margin */
    }
    
    .hero-image-placeholder i {
        font-size: 4.5rem !important; /* Reduced from 6rem */
    }

    .hero-image-container {
        min-height: 120px; /* Reduced from 200px */
        margin-top: 1rem; /* Added margin to create proper spacing */
    }
    
    /* Better button spacing on mobile */
    .hero-content .d-flex {
        gap: 1rem; /* Reduced gap */
        margin-top: 1rem; /* Added top margin */
        justify-content: center !important; /* Center buttons */
    }
    
    .hero-content .btn {
        padding: 0.75rem 1.5rem; /* Slightly larger touch targets */
        font-size: 0.95rem;
    }
    
    /* Adjust hero background animation for mobile performance */
    .hero-section::before {
        animation-duration: 30s; /* Slower animation for mobile */
    }
    
    /* Center align content on mobile */
    .hero-content {
        text-align: center;
    }
    
    /* Remove any potential margin issues */
    .hero-section .row {
        margin: 0;
    }
    
    .hero-section .col-lg-6 {
        padding: 0 1rem;
    }
    
    .typewriter-text {
        line-height: 1.2;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item {
        width: 100%;
        left: 0 !important;
        padding-left: 3rem !important;
        padding-right: 0 !important;
        text-align: left !important;
    }
    
    .timeline-icon {
        left: 20px;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-filters {
        flex-direction: column;
        align-items: center;
    }
    
    .navbar-custom {
        padding: 0.5rem 0;
        min-height: 70px; /* Ensure consistent navbar height */
    }
    
    .footer-custom {
        padding: 2rem 0 1rem;
        margin-top: 3rem;
    }
    
    .footer-custom .row:first-child {
        text-align: center;
    }
    
    .footer-custom .col-md-6:first-child {
        justify-content: center !important;
        margin-bottom: 1rem;
    }
    
    .footer-custom .col-md-6:last-child {
        justify-content: center !important;
    }
    
    /* Contact Info Cards Mobile */
    .contact-info-card .small {
        font-size: 0.8rem;
        line-height: 1.3;
    }
    
    .contact-info-icon {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
    
    /* Footer Mobile Responsive */
    .footer-custom .row {
        text-align: center;
    }
    
    .footer-copyright {
        font-size: 0.85rem;
    }
    
    .footer-link {
        font-size: 0.85rem;
    }
    
    .social-link {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
    
    /* Login Mobile Responsive */
    .login-container {
        min-height: 60vh;
    }
    
    /* Dark mode specific responsive adjustments */
    [data-bs-theme="dark"] .navbar-custom {
        background: rgba(17, 24, 39, 0.95) !important;
    }
    
    [data-bs-theme="dark"] .card-custom {
        background: rgba(31, 41, 55, 0.95);
    }
}

/* Small Mobile Styles */
@media (max-width: 576px) {
    .main-content {
        padding-top: 65px; /* Even more compact */
    }
    
    .hero-section {
        min-height: 60vh;
        padding: 0.5rem 0;
    }
    
    .hero-content h1 {
        font-size: 1.9rem; /* Further reduced */
        line-height: 1.2;
    }
    
    .hero-content .lead {
        font-size: 0.95rem;
        line-height: 1.4;
    }
    
    /* Even smaller hero icon for very small screens */
    .hero-image-placeholder {
        width: 150px !important;
        height: 150px !important;
    }
    
    .hero-image-placeholder i {
        font-size: 3.5rem !important;
    }

    .hero-image-container {
        min-height: 100px;
    }
    
    /* Stack buttons vertically on very small screens */
    .hero-content .d-flex {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    
    .hero-content .btn {
        width: 100%;
        max-width: 250px;
    }
    
    .typewriter-text {
        min-height: 1.1em;
        line-height: 1.1;
    }
    
    .hero-content h1 {
        line-height: 1.1;
        min-height: 1.1em;
    }
    
    .card-custom {
        margin-bottom: 1rem;
    }
    
    .timeline-item {
        padding-left: 2rem !important;
    }
    
    .btn-gradient {
        padding: 0.5rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .footer-brand {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .social-link {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .footer-copyright {
        font-size: 0.8rem;
    }
    
    /* Reduce container padding */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Footer Mobile Responsive für sehr kleine Bildschirme */
    .footer-custom .d-flex.gap-2 {
        gap: 0.75rem !important;
    }
    
    .footer-link {
        font-size: 0.75rem;
        white-space: nowrap;
    }
    
    /* Login sehr kleine Bildschirme */
    .login-container {
        min-height: 50vh;
    }
}

/* Landscape mobile orientation - special case */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        min-height: 80vh; /* Larger for landscape */
    }
    
    .hero-image-placeholder {
        width: 180px !important;
        height: 180px !important;
    }
    
    .hero-image-placeholder i {
        font-size: 4rem !important;
    }

    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content .d-flex {
        flex-direction: row; /* Keep buttons horizontal in landscape */
    }
    
    .login-container {
        min-height: 60vh;
    }
}

/* Large Desktop Styles */
@media (min-width: 1200px) {
    .hero-content h1 {
        font-size: 4rem;
    }
    
    .hero-content .lead {
        font-size: 1.4rem;
    }
    
    .container {
        max-width: 1140px;
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    }
}

/* Ultra-wide Screens */
@media (min-width: 1600px) {
    .hero-content h1 {
        font-size: 4.5rem;
    }
    
    .container {
        max-width: 1320px;
    }
    
    .timeline-item {
        margin: 3rem 0;
    }
    
    .timeline-content {
        padding: 2rem;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card-custom {
        border: 2px solid var(--accent-color);
    }
    
    .btn-gradient {
        border: 2px solid white;
    }
    
    .navbar-custom {
        border-bottom-width: 2px;
    }
    
    .footer-custom::before {
        height: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hero-section::before {
        animation: none;
    }
    
    .hero-image-placeholder {
        animation: none;
    }
    
    .footer-custom {
        animation: none;
    }
    
    .btn-gradient::before {
        transition: none;
    }
}

/* Print styles */
@media print {
    .navbar-custom,
    .footer-custom,
    .theme-toggle,
    .lang-switcher {
        display: none;
    }
    
    .hero-section {
        background: none;
        min-height: auto;
        padding: 1rem 0;
    }
    
    .hero-section::before {
        display: none;
    }
    
    .card-custom {
        box-shadow: none;
        border: 1px solid #ddd;
        background: white !important;
        break-inside: avoid;
        margin-bottom: 1rem;
    }
    
    .footer-custom {
        background: none !important;
        color: #000 !important;
        border-top: 1px solid #000;
    }
    
    .footer-copyright {
        color: #000 !important;
    }
    
    .social-links {
        display: none;
    }
    
    .footer-brand {
        background: #000 !important;
        color: white !important;
    }
    
    .timeline::before {
        background: #ddd;
    }
    
    .timeline-icon {
        background: #ddd !important;
        color: #000 !important;
    }
    
    .btn-gradient {
        background: #000 !important;
        color: white !important;
        box-shadow: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        padding-top: 0; /* Remove any body padding that might cause gaps */
    }
    
    h1 { font-size: 18pt; }
    h2 { font-size: 16pt; }
    h3 { font-size: 14pt; }
    h4 { font-size: 13pt; }
    h5 { font-size: 12pt; }
    h6 { font-size: 11pt; }
}

/* Screen reader only content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus management for accessibility */
@media (any-hover: none) {
    .card-custom:hover {
        transform: none;
    }
    
    .social-link:hover {
        transform: none;
    }
    
    .btn-gradient:hover {
        transform: none;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .nav-link {
        padding: 0.75rem 1rem;
    }
    
    .theme-toggle {
        width: 56px;
        height: 56px;
    }
    
    .social-link {
        width: 48px;
        height: 48px;
    }
    
    .btn-gradient {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
}

/* Extra small devices optimization */
@media (max-width: 320px) {
    .hero-content h1 {
        font-size: 1.75rem;
    }
    
    .hero-content .lead {
        font-size: 1rem;
    }
    
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .footer-brand {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    .social-link {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    .footer-copyright {
        font-size: 0.75rem;
    }
}
