/* =====================================================
   Renew Planet Solutions - Responsive CSS
   FIXED: Mobile Navigation with proper positioning
   ===================================================== */

/* =====================================================
   Mobile Menu Toggle - HAMBURGER BUTTON
   ===================================================== */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 26px;
    height: 3px;
    background: white;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.menu-toggle span:nth-child(1) { margin-bottom: 5px; }
.menu-toggle span:nth-child(3) { margin-top: 5px; }

.header.scrolled .menu-toggle span {
    background: #1a1a2e;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}
.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* =====================================================
   Mobile Navigation Overlay
   ===================================================== */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* =====================================================
   Mobile Navigation Content Panel - FIXED POSITIONING
   ===================================================== */
.mobile-nav-content {
    position: fixed;
    top: 0;
    right: -320px;
    bottom: 0;
    width: 300px;
    max-width: 85vw;
    height: 100%;
    background: #ffffff;
    z-index: 99999;
    padding: 0;
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.mobile-nav-overlay.active .mobile-nav-content {
    right: 0;
}

/* =====================================================
   Mobile Nav Header - BLUE BAR AT TOP (STICKY)
   ===================================================== */
.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #056EB9 0%, #0D73FC 100%);
    padding: 15px 20px;
    min-height: 60px;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.mobile-nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
}

.mobile-nav-logo img {
    height: 28px;
    width: auto;
    filter: brightness(0) invert(1);
}

.mobile-nav-close {
    width: 36px;
    height: 36px;
    min-width: 36px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    font-size: 1.1rem;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    flex-shrink: 0;
}

.mobile-nav-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* =====================================================
   Mobile Menu Links - MAIN NAVIGATION
   ===================================================== */
.mobile-menu-nav {
    display: block;
    padding: 0;
    margin: 0;
    flex-shrink: 0;
}

.mobile-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: block;
}

.mobile-menu li {
    display: block;
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #eee;
}

.mobile-menu li:last-child {
    border-bottom: none;
}

.mobile-menu li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    background: transparent;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.mobile-menu li a i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
    color: #056EB9;
    flex-shrink: 0;
}

.mobile-menu li a:hover,
.mobile-menu li a.active {
    background: rgba(5, 110, 185, 0.08);
    color: #056EB9;
    border-left-color: #056EB9;
}

/* =====================================================
   Mobile Nav Contact Section - FIXED OVERFLOW
   ===================================================== */
.mobile-nav-contact {
    display: block;
    margin: 0;
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
    flex-shrink: 0;
}

.mobile-nav-contact-title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #888;
    margin-bottom: 12px;
}

.mobile-nav-contact a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    color: #555;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s;
    overflow: hidden;
}

.mobile-nav-contact a:hover {
    color: #056EB9;
}

.mobile-nav-contact a i {
    width: 36px;
    height: 36px;
    min-width: 36px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #056EB9;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    flex-shrink: 0;
}

.mobile-nav-contact a span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

/* =====================================================
   Mobile Nav CTA Button
   ===================================================== */
.mobile-nav-cta {
    padding: 15px 20px 25px;
    flex-shrink: 0;
}

.mobile-nav-cta .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 10px;
    background: linear-gradient(135deg, #056EB9 0%, #0D73FC 100%);
    color: white;
    border: none;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(5, 110, 185, 0.4);
    transition: all 0.3s;
}

.mobile-nav-cta .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(5, 110, 185, 0.5);
}

/* =====================================================
   RESPONSIVE BREAKPOINTS
   ===================================================== */

/* Tablet (< 992px) - SHOW HAMBURGER */
@media (max-width: 992px) {
    .menu-toggle { display: flex; }
    .nav-menu, .header-cta { display: none; }
    
    .about-grid { grid-template-columns: 1fr; gap: 40px; }
    .about-image { max-width: 500px; margin: 0 auto; }
    .about-image .floating-card { right: 20px; bottom: 20px; }
    .about-features { grid-template-columns: 1fr; }
    
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .projects-grid { grid-template-columns: repeat(2, 1fr); }
    .contact-grid { grid-template-columns: 1fr; }
    
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-about, .footer-brand { grid-column: span 2; max-width: 100%; }
}

/* Large Phone (< 768px) */
@media (max-width: 768px) {
    .section { padding: 60px 0; }
    
    .header { padding: 15px 0; }
    .header.scrolled { padding: 10px 0; }
    .logo img { height: 35px; }
    .logo .site-name { font-size: 1.1rem; }
    
    .hero { min-height: auto; padding: 120px 0 80px; }
    .hero-content { text-align: center; }
    .hero-subtitle { padding-left: 0; }
    .hero-subtitle::before { display: none; }
    .hero-buttons { flex-direction: column; align-items: stretch; }
    .hero-buttons .btn { width: 100%; justify-content: center; }
    
    .page-hero { min-height: 300px; }
    
    .services-grid { grid-template-columns: 1fr; }
    .service-card { padding: 30px 25px; }
    
    .projects-grid { grid-template-columns: 1fr; }
    .project-card { height: 300px; }
    
    .stats-grid { gap: 20px; }
    .stat-number, .stat-card .number { font-size: 2rem; }
    .stat-label, .stat-card .label { font-size: 0.75rem; }
    
    .form-row { grid-template-columns: 1fr; }
    
    .footer { padding-top: 60px; }
    .footer-grid { grid-template-columns: 1fr; gap: 30px; }
    .footer-about, .footer-brand { grid-column: span 1; }
    .footer-bottom .container { flex-direction: column; gap: 15px; text-align: center; }
    
    .cta-section { padding: 60px 0; }
    .cta-buttons { flex-direction: column; align-items: stretch; }
    .cta-buttons .btn { width: 100%; justify-content: center; }
    
    .back-to-top { bottom: 20px; right: 20px; width: 45px; height: 45px; }
}

/* Small Phone (< 576px) */
@media (max-width: 576px) {
    .container { padding: 0 15px; }
    .hero { padding: 100px 0 60px; }
    .section-header { margin-bottom: 40px; }
    .section-header .subtitle::before, .section-header .subtitle::after { display: none; }
    
    .about-image .floating-card { padding: 15px 20px; }
    .about-image .floating-card .number { font-size: 2rem; }
    
    .service-icon { width: 60px; height: 60px; font-size: 1.5rem; }
    .stats-section { padding: 40px 0; }
    
    .projects-filter { gap: 8px; }
    .filter-btn { padding: 8px 16px; font-size: 0.85rem; }
    
    .testimonial-card { padding: 25px; }
    .testimonial-author { flex-direction: column; text-align: center; }
    
    .contact-form, .contact-info { padding: 25px; }
    
    .btn { padding: 12px 24px; font-size: 0.9rem; }
    .btn-lg { padding: 14px 28px; }
    
    .partners-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    .partner-logo { height: 80px; padding: 15px; }
    
    /* Mobile nav adjustments for small screens */
    .mobile-nav-content { width: 280px; }
    .mobile-menu li a { padding: 14px 15px; font-size: 0.95rem; }
    .mobile-nav-contact { padding: 12px 15px; }
    .mobile-nav-cta { padding: 12px 15px 20px; }
}

/* Very Small (< 400px) */
@media (max-width: 400px) {
    .logo .site-name { font-size: 1rem; }
    .stats-grid { gap: 15px; }
    .stat-number, .stat-card .number { font-size: 1.75rem; }
    .project-card { height: 280px; }
    .project-overlay { padding: 20px; }
    .project-title { font-size: 1.1rem; }
    
    .mobile-nav-content { width: 260px; }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #056EB9;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s;
    z-index: 99;
    box-shadow: 0 5px 20px rgba(5, 110, 185, 0.4);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: #045fa0;
    transform: translateY(-5px);
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero { min-height: auto; padding: 100px 0 60px; }
    .page-hero { min-height: 250px; }
}

/* Print */
@media print {
    .header, .footer, .mobile-nav-overlay, .menu-toggle, .btn, .back-to-top { display: none !important; }
    .section { padding: 30px 0; }
}

/* Utilities */
.hide-mobile { display: block; }
.hide-desktop { display: none; }
@media (max-width: 768px) {
    .hide-mobile { display: none !important; }
    .hide-desktop { display: block !important; }
}
