/* Responsive CSS - Mobile First Approach with Bootstrap Integration */

/* Bootstrap utility classes for text wrapping */
.text-break {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
    white-space: normal !important;
}

/* Custom responsive adjustments for Bootstrap grid */
@media (max-width: 768px) {
    .hero-title {
        font-size: 1.8rem !important;
        line-height: 1.3 !important;
    }
    
    .hero-subtitle {
        font-size: 1rem !important;
        line-height: 1.4 !important;
    }
    
    .hero-description {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 1.5rem !important;
        line-height: 1.4 !important;
    }
    
    .hero-subtitle {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
    }
    
    .hero-description {
        font-size: 0.8rem !important;
        line-height: 1.6 !important;
    }
    
    .btn {
        font-size: 0.85rem !important;
        padding: 0.5rem 1rem !important;
    }
}

@media (max-width: 430px) {
    .hero-title {
        font-size: 1.3rem !important;
        line-height: 1.5 !important;
    }
    
    .hero-subtitle {
        font-size: 0.8rem !important;
        line-height: 1.6 !important;
    }
    
    .hero-description {
        font-size: 0.7rem !important;
        line-height: 1.7 !important;
    }
    
    .btn {
        font-size: 0.8rem !important;
        padding: 0.4rem 0.8rem !important;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-title {
        font-size: 2rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        line-height: 1.2;
        text-align: center;
        padding: 0 30px;
        margin: 0 10px;
    }
    
    .hero-title .highlight {
        display: block;
        text-align: center;
        margin: 0 auto;
    }
    
    .hero-title br {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--bg-primary);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow);
        padding: 2rem 0;
        transform: translateX(-40px);
    }
    
    .nav-menu.active {
        left: 0;
        transform: translateX(-40px);
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .theme-toggle {
        width: 35px;
        height: 35px;
    }
    
    .theme-toggle i {
        font-size: 1rem;
    }
    
    .language-switcher {
        margin-left: 0;
        margin-top: 1rem;
    }
    
    .lang-dropdown-btn {
        min-width: 100px;
        font-size: 0.8rem;
    }
    
    .lang-dropdown-btn .lang-flag-img {
        width: 16px;
        height: 12px;
    }
    
    .lang-dropdown-content {
        right: auto;
        left: -30px;
        min-width: 140px;
    }
    
    .lang-dropdown-content .lang-flag-img {
        width: 18px;
        height: 13px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
        padding: 0 15px;
    }
    
    .hero-subtitle {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        padding: 0 15px;
        text-align: center;
        font-size: 1.1rem;
        line-height: 1.3;
    }
    
    .hero-description {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        padding: 0 15px;
        text-align: center;
        line-height: 1.4;
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .btn {
        width: 200px;
        justify-content: center;
        font-size: 0.9rem;
        padding: 0.6rem 1rem;
    }

    .hero-avatar {
        width: 200px;
        height: 200px;
        font-size: 5rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-info {
        padding: 0 10px;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .contact-item i {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .social-links {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .social-links a {
        width: 40px;
        height: 40px;
    }

    .hero-stats {
        grid-template-columns: 1fr;
    }

    .services-grid,
    .portfolio-grid,
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.5rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        line-height: 1.3;
        padding: 0 25px;
        text-align: center;
        margin: 0 10px;
    }
    
    .hero-title .highlight {
        display: block;
        text-align: center;
        margin: 0 auto;
    }
    
    .hero-title br {
        display: block;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        justify-content: center;
    }
    
    .contact-content {
        padding: 0 10px;
    }
    
    .contact-info h3 {
        font-size: 1.5rem;
        text-align: center;
    }
    
    .contact-item h4 {
        font-size: 1rem;
    }
    
    .contact-item p {
        font-size: 0.9rem;
    }
    
    .social-links {
        gap: 0.5rem;
    }
    
    .social-links a {
        width: 35px;
        height: 35px;
    }
    
    .social-links i {
        font-size: 1rem;
    }
    
    .contact-form {
        padding: 1.5rem;
        margin: 0 10px;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    .form-group textarea {
        min-height: 100px;
    }
    
    .hero-text {
        padding: 0 5px;
    }
    
    .hero-text h1 {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    
    .hero-subtitle {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        padding: 0 12px;
        text-align: center;
        font-size: 1rem;
        line-height: 1.3;
    }
    
    .hero-description {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        padding: 0 12px;
        text-align: center;
        line-height: 1.4;
        font-size: 0.9rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 0.8rem;
        align-items: center;
    }
    
    .btn {
        width: 180px;
        justify-content: center;
        font-size: 0.85rem;
        padding: 0.5rem 0.8rem;
    }
}

/* 360px va undan kichik ekranlar uchun */
@media (max-width: 360px) {
    .container {
        padding: 0 10px;
    }
    
    .hero-title {
        font-size: 1.3rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        line-height: 1.4;
        padding: 0 20px;
        text-align: center;
        margin: 0 8px;
    }
    
    .hero-title .highlight {
        display: block;
        text-align: center;
        margin: 0 auto;
    }
    
    .hero-title br {
        display: block;
    }
    
    .hero-content {
        padding: 0 10px;
        gap: 1.5rem;
    }
    
    .hero-avatar {
        width: 150px;
        height: 150px;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        padding: 0 8px;
        text-align: center;
        line-height: 1.3;
    }
    
    .hero-description {
        font-size: 0.8rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        padding: 0 8px;
        text-align: center;
        line-height: 1.4;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 0.6rem;
        align-items: center;
    }
    
    .btn {
        width: 160px;
        justify-content: center;
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
    }
    
    .contact-content {
        padding: 0 5px;
    }
    
    .contact-info h3 {
        font-size: 1.3rem;
    }
    
    .contact-item h4 {
        font-size: 0.9rem;
    }
    
    .contact-item p {
        font-size: 0.8rem;
    }
    
    .social-links a {
        width: 30px;
        height: 30px;
    }
    
    .social-links i {
        font-size: 0.9rem;
    }
    
    .contact-form {
        padding: 1rem;
        margin: 0 5px;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
    
    .form-group textarea {
        min-height: 80px;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* 430px va undan kichik ekranlar uchun (iPhone 15 Pro Max va katta telefonlar) */
@media (max-width: 430px) {
    .hero-title {
        font-size: 1.2rem;
        padding: 0 25px;
        margin: 0 12px;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        white-space: normal;
        word-break: break-word;
        line-height: 1.4;
        text-align: center;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .hero-title .highlight {
        display: block;
        text-align: center;
        margin: 0 auto;
    }
    
    .hero-content {
        padding: 0 5px;
        max-width: 100%;
        box-sizing: border-box;
        overflow-wrap: break-word;
        word-wrap: break-word;
    }
    
    .hero-avatar {
        width: 140px;
        height: 140px;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .contact-content {
        padding: 0 8px;
    }
    
    .contact-form {
        padding: 1.2rem;
        margin: 0 8px;
    }
    
    .social-links a {
        width: 32px;
        height: 32px;
    }
    
    .social-links i {
        font-size: 0.9rem;
    }
    
    .hero-subtitle {
        font-size: 0.7rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        white-space: normal;
        word-break: break-word;
        padding: 0 25px;
        text-align: center;
        line-height: 1.6;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .hero-description {
        font-size: 0.6rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        white-space: normal;
        word-break: break-word;
        padding: 0 25px;
        text-align: center;
        line-height: 1.7;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }
    
    .btn {
        width: 120px;
        justify-content: center;
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }
}

/* 320px va undan kichik ekranlar uchun (iPhone SE, kichik telefonlar) */
@media (max-width: 320px) {
    .hero-title {
        font-size: 1.2rem;
        padding: 0 15px;
        margin: 0 6px;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        line-height: 1.3;
        text-align: center;
    }
    
    .hero-title .highlight {
        display: block;
        text-align: center;
        margin: 0 auto;
    }
    
    .hero-content {
        padding: 0 8px;
    }
    
    .hero-avatar {
        width: 120px;
        height: 120px;
    }
    
    .section-header h2 {
        font-size: 1.6rem;
    }
    
    .contact-content {
        padding: 0 3px;
    }
    
    .contact-form {
        padding: 0.8rem;
        margin: 0 3px;
    }
    
    .social-links a {
        width: 28px;
        height: 28px;
    }
    
    .social-links i {
        font-size: 0.8rem;
    }
    
    .hero-subtitle {
        font-size: 0.8rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        padding: 0 5px;
        text-align: center;
        line-height: 1.3;
    }
    
    .hero-description {
        font-size: 0.7rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        padding: 0 5px;
        text-align: center;
        line-height: 1.4;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }
    
    .btn {
        width: 140px;
        justify-content: center;
        font-size: 0.75rem;
        padding: 0.3rem 0.5rem;
    }
}
