/* ==========================================
   RESPONSIVE STYLES - UPAYOGI WEBSITE
   ========================================== */

/* === ADDITIONAL RESPONSIVE UTILITIES === */

/* Container adjustments */
@media (max-width: 1400px) {
    .container {
        max-width: 1200px;
    }
}

@media (max-width: 1200px) {
    .container {
        max-width: 960px;
    }
}

/* === NAVIGATION RESPONSIVE === */
@media (max-width: 991px) {
    .modern-navbar .navbar-collapse {
        background: rgba(44, 62, 80, 0.95);
        backdrop-filter: blur(10px);
        border-radius: var(--border-radius);
        padding: 1rem;
        margin-top: 1rem;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .modern-nav-link {
        text-align: center;
        margin: 0.25rem 0;
        padding: 0.75rem 1rem !important;
    }
    
    .social-icons-header {
        justify-content: center;
        margin: 1rem 0;
        padding-top: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
}

/* === HERO SECTION RESPONSIVE === */
@media (max-width: 1200px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-image-wrapper {
        margin-top: 3rem;
    }
}

@media (max-width: 992px) {
    .hero-section {
        text-align: center;
        padding-top: 120px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .hero-cta {
        justify-content: center;
        margin-bottom: 2rem;
    }
    
    .hero-image-col {
        margin-top: 2rem;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-badge {
        font-size: 0.8rem;
        padding: 0.4rem 1rem;
    }
    
    .feature-item {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }
    
    .feature-item i {
        margin-bottom: 0.5rem;
        margin-right: 0;
    }
    
    .hero-cta .modern-btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .hero-main-image {
        max-width: 350px;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 1.8rem;
        line-height: 1.3;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-features {
        margin-bottom: 1.5rem;
    }
}

/* === SERVICES SECTION RESPONSIVE === */
@media (max-width: 992px) {
    .service-card {
        margin-bottom: 2rem;
    }
    
    .services-cta {
        padding: 2rem;
    }
    
    .services-cta h3 {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .service-image {
        height: 200px;
    }
    
    .service-content {
        padding: 1.5rem;
    }
    
    .service-title {
        font-size: 1.2rem;
    }
    
    .service-features {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .service-image {
        height: 180px;
    }
    
    .service-content {
        padding: 1rem;
    }
    
    .services-cta {
        padding: 1.5rem;
    }
}

/* === TEAM SECTION RESPONSIVE === */
@media (max-width: 992px) {
    .team-member-card {
        margin-bottom: 2rem;
    }
}

@media (max-width: 768px) {
    .member-image {
        height: 250px;
    }
    
    .member-info {
        padding: 1.5rem;
    }
    
    .member-name {
        font-size: 1.1rem;
    }
    
    .member-expertise {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .member-image {
        height: 200px;
    }
    
    .member-info {
        padding: 1rem;
    }
    
    .expertise-tag {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }
}

/* === ABOUT SECTION RESPONSIVE === */
@media (max-width: 992px) {
    .about-content {
        margin-bottom: 3rem;
        text-align: center;
    }
    
    .feature-row {
        justify-content: center;
    }
    
    .about-stats {
        justify-content: center;
        margin-bottom: 2rem;
    }
    
    .about-images {
        text-align: center;
    }
}

@media (max-width: 768px) {
    .feature-row {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    
    .feature-icon {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .about-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .secondary-image {
        display: none;
    }
    
    .floating-element {
        display: none;
    }
}

@media (max-width: 576px) {
    .about-description {
        font-size: 1rem;
    }
    
    .feature-text h4 {
        font-size: 1.1rem;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
}

/* === CONTACT SECTION RESPONSIVE === */
@media (max-width: 992px) {
    .contact-methods {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .contact-item {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .contact-item {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
    
    .contact-icon {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .contact-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .contact-buttons .modern-btn {
        width: 100%;
        max-width: 300px;
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 576px) {
    .contact-description {
        font-size: 1rem;
    }
    
    .quick-contact-form h3 {
        font-size: 1.5rem;
    }
}

/* === FOOTER RESPONSIVE === */
@media (max-width: 992px) {
    .modern-footer {
        padding: 3rem 0 1.5rem;
    }
    
    .footer-brand,
    .footer-title {
        text-align: center;
    }
    
    .footer-links {
        text-align: center;
    }
    
    .footer-contact {
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .footer-bottom {
        text-align: center;
    }
    
    .footer-bottom .row > div {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .modern-footer {
        padding: 2rem 0 1rem;
    }
    
    .footer-brand h3 {
        font-size: 1.3rem;
    }
    
    .footer-title {
        font-size: 1rem;
    }
    
    .footer-description {
        font-size: 0.9rem;
    }
    
    .social-links .social-link {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* === UTILITY RESPONSIVE CLASSES === */

/* Display utilities */
@media (max-width: 575px) {
    .d-sm-none { display: none !important; }
    .d-sm-block { display: block !important; }
    .d-sm-flex { display: flex !important; }
}

@media (max-width: 767px) {
    .d-md-none { display: none !important; }
    .d-md-block { display: block !important; }
    .d-md-flex { display: flex !important; }
}

@media (max-width: 991px) {
    .d-lg-none { display: none !important; }
    .d-lg-block { display: block !important; }
    .d-lg-flex { display: flex !important; }
}

/* Text alignment utilities */
@media (max-width: 575px) {
    .text-sm-center { text-align: center !important; }
    .text-sm-left { text-align: left !important; }
    .text-sm-right { text-align: right !important; }
}

@media (max-width: 767px) {
    .text-md-center { text-align: center !important; }
    .text-md-left { text-align: left !important; }
    .text-md-right { text-align: right !important; }
}

@media (max-width: 991px) {
    .text-lg-center { text-align: center !important; }
    .text-lg-left { text-align: left !important; }
    .text-lg-right { text-align: right !important; }
}

/* Spacing utilities */
@media (max-width: 575px) {
    .p-sm-1 { padding: 0.25rem !important; }
    .p-sm-2 { padding: 0.5rem !important; }
    .p-sm-3 { padding: 1rem !important; }
    .p-sm-4 { padding: 1.5rem !important; }
    .p-sm-5 { padding: 3rem !important; }
    
    .m-sm-1 { margin: 0.25rem !important; }
    .m-sm-2 { margin: 0.5rem !important; }
    .m-sm-3 { margin: 1rem !important; }
    .m-sm-4 { margin: 1.5rem !important; }
    .m-sm-5 { margin: 3rem !important; }
}

/* === SCROLLBAR STYLING === */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-gradient);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* === SELECTION STYLING === */
::selection {
    background: var(--primary-color);
    color: var(--white);
}

::-moz-selection {
    background: var(--primary-color);
    color: var(--white);
}

/* === LOADING SPINNER === */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--gray-200);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* === PERFORMANCE OPTIMIZATIONS === */
.hero-background,
.service-image img,
.member-image img {
    will-change: transform;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .floating-card,
    .scroll-wheel,
    .floating-element {
        animation: none;
    }
    
    .hero-background,
    .service-image img,
    .member-image img {
        will-change: auto;
    }
}

/* === DARK MODE SUPPORT === */
@media (prefers-color-scheme: dark) {
    :root {
        --white: #1a1a1a;
        --gray-100: #2d2d2d;
        --gray-200: #3d3d3d;
        --gray-800: #e0e0e0;
        --dark-color: #f0f0f0;
    }
    
    .services-section,
    .about-section {
        background: var(--gray-100);
    }
    
    .service-card,
    .team-member-card {
        background: var(--gray-200);
        border: 1px solid var(--gray-300);
    }
}

/* === IMPROVED FOCUS MANAGEMENT === */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: var(--white);
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

/* === ENHANCED TOUCH TARGETS === */
@media (hover: none) and (pointer: coarse) {
    .modern-btn,
    .social-link,
    .contact-link {
        min-height: 44px;
        min-width: 44px;
    }
    
    .modern-nav-link {
        padding: 1rem !important;
    }
}

/* === IMPROVED ERROR STATES === */
.error-message {
    color: var(--danger-color);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
}

.error-message i {
    margin-right: 0.5rem;
}

.success-message {
    color: var(--success-color);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
}

.success-message i {
    margin-right: 0.5rem;
}

/* === ENHANCED FORM STYLING === */
.form-control {
    border: 2px solid var(--gray-300);
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    transition: var(--transition);
    font-size: 1rem;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(255, 107, 53, 0.25);
    outline: none;
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

/* === CAROUSEL/SLIDER ENHANCEMENTS === */
.carousel-indicators {
    bottom: -50px;
}

.carousel-indicators [data-bs-target] {
    background: var(--primary-color);
    border-radius: 50%;
    width: 12px;
    height: 12px;
    margin: 0 6px;
}

.carousel-control-prev,
.carousel-control-next {
    width: 50px;
    height: 50px;
    background: var(--primary-gradient);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.8;
    transition: var(--transition);
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

/* === ENHANCED ANIMATIONS === */
@media (prefers-reduced-motion: no-preference) {
    .fade-in {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }
    
    .fade-in.visible {
        opacity: 1;
        transform: translateY(0);
    }
    
    .slide-in-left {
        opacity: 0;
        transform: translateX(-50px);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }
    
    .slide-in-left.visible {
        opacity: 1;
        transform: translateX(0);
    }
    
    .slide-in-right {
        opacity: 0;
        transform: translateX(50px);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }
    
    .slide-in-right.visible {
        opacity: 1;
        transform: translateX(0);
    }
}

/* === BACK TO TOP BUTTON === */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-gradient);
    color: var(--white);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
    box-shadow: var(--shadow-lg);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

@media (max-width: 768px) {
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
        font-size: 1rem;
    }
}
