/* ========== MOBILE RESPONSIVE DESIGN ========== */
/* Mobile Menu Styles */
@media (max-width: 768px) {
    /* Navbar Container for Mobile */
    .nav-container {
        padding: 12px 15px;
    }
    
    /* Hide regular nav menu on mobile */
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 110px;
        flex-direction: column;
        background-color: var(--white);
        width: 280px;
        max-width: 85%;
        height: calc(100vh - 110px);
        text-align: left;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 5px 0 25px rgba(0, 0, 0, 0.15);
        padding: 20px 15px;
        border-radius: 0 20px 20px 0;
        z-index: 1001;
        margin: 0;
        align-items: flex-start;
        justify-content: flex-start;
        overflow-y: auto;
        display: flex;
    }
    
    .nav-menu.active {
        left: 0;
        top: 110px;
    }
    
    .nav-menu li {
        width: 100%;
        margin: 8px 0;
        opacity: 0;
        transform: translateX(-20px);
        transition: all 0.3s ease;
    }
    
    .nav-menu.active li {
        opacity: 1;
        transform: translateX(0);
    }
    
    /* Staggered animation for menu items */
    .nav-menu.active li:nth-child(1) { transition-delay: 0.1s; }
    .nav-menu.active li:nth-child(2) { transition-delay: 0.15s; }
    .nav-menu.active li:nth-child(3) { transition-delay: 0.2s; }
    .nav-menu.active li:nth-child(4) { transition-delay: 0.25s; }
    .nav-menu.active li:nth-child(5) { transition-delay: 0.3s; }
    .nav-menu.active li:nth-child(6) { transition-delay: 0.35s; }
    .nav-menu.active li:nth-child(7) { transition-delay: 0.4s; }
    
    /* Nav buttons in mobile menu */
    .nav-btn {
        display: block;
        width: 100%;
        text-align: left;
        padding: 14px 20px;
        margin: 5px 0;
        border-radius: 12px;
        background-color: var(--dark-green);
        color: var(--white);
        font-size: 1rem;
        font-weight: 600;
        transition: all 0.3s ease;
        border: 2px solid transparent;
        box-shadow: 0 4px 12px rgba(27, 94, 32, 0.1);
    }
    
    .nav-btn:hover, 
    .nav-btn.active {
        background-color: var(--white);
        color: var(--primary-green);
        border-color: var(--primary-green);
        transform: translateX(5px);
        box-shadow: 0 6px 15px rgba(27, 94, 32, 0.15);
    }
    
    /* Show hamburger button on mobile */
    .hamburger {
        display: flex;
        flex-direction: column;
        cursor: pointer;
        width: 30px;
        height: 24px;
        justify-content: space-between;
        position: relative;
        z-index: 1002;
    }
    
    .bar {
        width: 100%;
        height: 3px;
        background-color: var(--dark-green);
        border-radius: 3px;
        transition: all 0.3s ease;
        transform-origin: left center;
    }
    
    /* Hamburger animation when active */
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(0px) rotate(45deg);
        width: 100%;
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
        transform: translateX(-10px);
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-21px) rotate(-45deg);
        width: 100%;
    }
    
    /* Mobile overlay */
    .mobile-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(2px);
        z-index: 1000;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .mobile-overlay.active {
        display: block;
        opacity: 1;
    }
    
    /* Adjust ticker bar for mobile */
    .ticker-bar {
        font-size: 0.8rem;
        padding: 8px 0;
        position: relative;
        z-index: 999;
    }
    
    .ticker-content {
        animation: ticker 15s linear infinite;
    }
    
    .ticker-content span {
        margin: 0 15px;
    }
    
    /* Adjust hero section for mobile */
    .hero-slider {
        height: 60vh;
        margin-top: 0;
    }
    
    .slide-content h1 {
        font-size: 2rem;
        line-height: 1.3;
    }
    
    .slide-content p {
        font-size: 1rem;
    }
    
    /* Adjust container padding */
    .container {
        padding: 0 15px;
    }
    
    section {
        padding: 50px 0;
    }
    
    h1 {
        font-size: 1.8rem;
        line-height: 1.3;
    }
    
    h2 {
        font-size: 1.6rem;
        line-height: 1.3;
    }
    
    h3 {
        font-size: 1.3rem;
    }
    
    /* Hide iPhone demo on mobile */
    .iphone-demo {
        display: none !important;
    }
    
    /* Adjust floating buttons for mobile */
    .floating-buttons {
        bottom: 20px;
        padding: 0 15px;
        z-index: 997;
    }
    
    .floating-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    /* Adjust cards for mobile */
    .home-cards,
    .package-cards,
    .blogs-grid,
    .projects-grid,
    .accounts-grid,
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .card, .package-card, .account-card {
        padding: 25px 20px;
        margin: 10px 0;
    }
    
    /* Adjust comparison table for mobile */
    .comparison-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        font-size: 0.9rem;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 10px 8px;
    }
    
    /* Adjust footer for mobile */
    .footer-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-logo img {
        height: 50px;
    }
    
    .footer-links,
    .footer-contact,
    .footer-social {
        margin-bottom: 25px;
    }
    
    /* Adjust buttons for mobile */
    .btn {
        padding: 12px 25px;
        font-size: 0.95rem;
    }
    
    /* Adjust profile section for mobile */
    .profile-section {
        flex-direction: column;
        gap: 30px;
    }
    
    .profile-image,
    .profile-info {
        min-width: 100%;
    }
    
    /* Adjust contact card for mobile */
    .contact-card {
        padding: 30px 20px;
    }
    
    /* Adjust blog cards for mobile */
    .blog-card {
        margin-bottom: 20px;
    }
    
    .blog-image {
        height: 180px;
    }
    
    /* Adjust project cards for mobile */
    .project-card {
        margin-bottom: 20px;
    }
    
    .project-image {
        height: 180px;
    }
    
    /* Adjust account cards for mobile */
    .account-card {
        margin-bottom: 25px;
    }
    
    .account-detail {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .copy-btn {
        align-self: flex-start;
    }
    
    /* Adjust back to top button */
    .back-to-top {
        bottom: 85px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    /* Remove desktop-only animations */
    .card:hover,
    .package-card:hover,
    .blog-card:hover,
    .project-card:hover {
        transform: none;
    }
}

/* ========== SMALL MOBILE DEVICES (Up to 480px) ========== */
@media (max-width: 480px) {
    .nav-container {
        padding: 10px 12px;
    }
    
    .nav-logo img {
        height: 40px;
    }
    
    .nav-menu {
        width: 250px;
        top: 104px;
        height: calc(100vh - 104px);
    }
    
    .nav-btn {
        padding: 12px 18px;
        font-size: 0.95rem;
    }
    
    /* Adjust ticker bar for small screens */
    .ticker-bar {
        font-size: 0.75rem;
        padding: 6px 0;
    }
    
    .ticker-content {
        animation: ticker 12s linear infinite;
    }
    
    /* Adjust hero section */
    .hero-slider {
        height: 50vh;
    }
    
    .slide-content h1 {
        font-size: 1.8rem;
    }
    
    .slide-content p {
        font-size: 0.95rem;
        padding: 0 10px;
    }
    
    /* Typography adjustments */
    h1 {
        font-size: 1.6rem;
    }
    
    h2 {
        font-size: 1.4rem;
    }
    
    h3 {
        font-size: 1.2rem;
    }
    
    /* Adjust cards padding */
    .card, .package-card, .account-card {
        padding: 20px 15px;
    }
    
    /* Adjust price in packages */
    .price {
        font-size: 2rem;
    }
    
    /* Adjust floating buttons */
    .floating-buttons {
        bottom: 15px;
        padding: 0 12px;
    }
    
    .floating-btn {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    /* Adjust back to top button */
    .back-to-top {
        bottom: 80px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    /* Adjust form inputs */
    input, textarea {
        font-size: 16px !important; /* Prevents zoom on iOS */
    }
    
    /* Adjust footer */
    footer {
        padding: 40px 0 20px;
    }
    
    .footer-container {
        gap: 25px;
    }
    
    .social-icons {
        justify-content: flex-start;
    }
    
    /* Adjust blog detail page */
    .blog-detail-image {
        height: 200px;
    }
    
    .blog-content-detail {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    /* Adjust comparison table for very small screens */
    .comparison-table {
        font-size: 0.8rem;
    }
}

/* ========== VERY SMALL MOBILE DEVICES (Up to 360px) ========== */
@media (max-width: 360px) {
    .nav-menu {
        width: 230px;
    }
    
    .nav-btn {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .hero-slider {
        height: 45vh;
    }
    
    .slide-content h1 {
        font-size: 1.5rem;
    }
    
    .floating-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .card, .package-card, .account-card {
        padding: 18px 12px;
    }
    
    h1 {
        font-size: 1.4rem;
    }
    
    h2 {
        font-size: 1.2rem;
    }
}

/* ========== MOBILE LANDSCAPE ORIENTATION ========== */
@media (max-height: 500px) and (orientation: landscape) {
    .nav-menu {
        height: calc(100vh - 110px);
        overflow-y: auto;
        padding: 15px;
    }
    
    .nav-btn {
        padding: 10px 15px;
        margin: 3px 0;
        font-size: 0.9rem;
    }
    
    .hero-slider {
        height: 70vh;
    }
    
    .floating-buttons {
        bottom: 10px;
    }
}

/* ========== TABLET DEVICES (768px to 1024px) ========== */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 95%;
    }
    
    .home-cards,
    .package-cards,
    .blogs-grid,
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .accounts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .nav-menu {
        gap: 10px;
    }
    
    .nav-btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    
    .iphone-demo {
        width: 250px;
        height: 500px;
        right: 20px;
        bottom: 100px;
    }
    
    .hero-slider {
        height: 70vh;
    }
}

/* ========== MOBILE MENU ANIMATION KEYFRAMES ========== */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ========== UTILITY CLASSES FOR MOBILE ========== */
.mobile-only {
    display: none !important;
}

@media (max-width: 768px) {
    .mobile-only {
        display: block !important;
    }
    
    .desktop-only {
        display: none !important;
    }
}

/* ========== IMPROVE TOUCH TARGETS FOR MOBILE ========== */
@media (max-width: 768px) {
    button,
    .btn,
    .nav-btn,
    .copy-btn,
    .social-icon,
    .floating-btn {
        min-height: 44px; /* Apple's recommended minimum touch target size */
        min-width: 44px;
    }
    
    input,
    textarea,
    select {
        font-size: 16px; /* Prevents iOS zoom on focus */
    }
}

/* ========== MOBILE SCROLLBAR STYLING ========== */
@media (max-width: 768px) {
    ::-webkit-scrollbar {
        width: 6px;
        height: 6px;
    }
    
    ::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 10px;
    }
    
    ::-webkit-scrollbar-thumb {
        background: var(--primary-green);
        border-radius: 10px;
    }
    
    ::-webkit-scrollbar-thumb:hover {
        background: var(--dark-green);
    }
}

/* ========== MOBILE FORM STYLING ========== */
@media (max-width: 768px) {
    form input,
    form textarea,
    form select {
        width: 100%;
        padding: 12px 15px;
        margin-bottom: 15px;
        border: 2px solid #eee;
        border-radius: 10px;
        font-size: 16px;
        transition: all 0.3s ease;
    }
    
    form input:focus,
    form textarea:focus,
    form select:focus {
        border-color: var(--primary-green);
        outline: none;
        box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
    }
    
    form label {
        display: block;
        margin-bottom: 8px;
        font-weight: 600;
        color: var(--dark-green);
    }
}