/* ===== RESPONSIVE DESIGN - CLEAN VERSION ===== */

/* ===== DESKTOP STYLES (Default) ===== */
/* All desktop styles are in main.css */

/* ===== LARGE DESKTOP (1200px and above) ===== */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }

    .hero-title {
        font-size: 3.5rem;
    }

    .tools-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===== TABLET STYLES (768px to 1199px) ===== */
@media (max-width: 1199px) {
    .container {
        padding: 0 1.5rem;
    }

    .hero-container {
        gap: 2rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (max-width: 991px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .footer-links {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

/* ===== MOBILE STYLES (767px and below) ===== */
@media (max-width: 767px) {
    /* Container */
    .container {
        padding: 0 1rem;
    }

    /* ===== NAVIGATION ===== */
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: left;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.1);
        padding: 1.5rem 0;
        gap: 0;
        z-index: 1000;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        margin: 0;
        border-bottom: 1px solid #f1f5f9;
    }

    .nav-item:last-child {
        border-bottom: none;
    }

    .nav-link {
        padding: 1rem 1.5rem;
        display: flex;
        align-items: center;
        gap: 0.75rem;
        font-size: 1rem;
        color: #374151;
        border-radius: 0;
    }

    .nav-link:hover {
        background-color: #f8fafc;
        color: #2563eb;
    }

    .nav-link.active {
        background-color: #eff6ff;
        color: #2563eb;
        border-left: 4px solid #2563eb;
    }

    .nav-link.active::after {
        display: none;
    }

    .hamburger {
        display: flex;
        z-index: 1001;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* ===== DROPDOWN MENU ===== */
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background-color: #f1f5f9;
        border: none;
        border-left: 3px solid #cbd5e1;
        margin: 0;
        padding: 0.5rem 0;
        border-radius: 0;
    }

    .dropdown-arrow {
        display: none;
    }

    .dropdown-menu a {
        padding: 0.75rem 2rem;
        font-size: 0.9rem;
        border-radius: 0;
        margin: 0;
        color: #64748b;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        border-bottom: 1px solid #e2e8f0;
    }

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

    .dropdown-menu a:hover {
        background-color: #e2e8f0;
        color: #2563eb;
    }

    /* ===== HERO SECTION ===== */
    .hero {
        padding: 2rem 0;
        min-height: 50vh;
    }

    .hero-container {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .hero-badge {
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
        margin-bottom: 1.5rem;
    }

    .hero-cta {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .cta-primary, .cta-secondary {
        width: 100%;
        max-width: 280px;
        justify-content: center;
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }

    .hero-image {
        order: -1;
        max-width: 100%;
    }

    .hero-image img {
        width: 100%;
        height: auto;
        max-width: 400px;
    }

    /* ===== TOOLS SECTION ===== */
    .tools-section {
        padding: 4rem 0;
    }

    .tools-header {
        margin-bottom: 3rem;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    .tools-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .tool-card {
        padding: 1.5rem;
    }

    .tool-icon {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
    }

    .tool-title {
        font-size: 1.1rem;
        margin: 1rem 0 0.5rem;
    }

    .tool-description {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    .tool-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
        width: 100%;
        justify-content: center;
    }

    /* ===== FEATURES SECTION ===== */
    .features-section {
        padding: 4rem 0;
    }

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

    .feature-card {
        text-align: center;
        padding: 2rem 1rem;
    }

    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        margin: 0 auto 1rem;
    }

    /* ===== STATS SECTION ===== */
    .stats-section {
        padding: 3rem 0;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .stat-card {
        padding: 1.5rem 1rem;
        text-align: center;
    }

    .stat-number {
        font-size: 2rem;
    }

    .stat-label {
        font-size: 0.9rem;
    }

    /* ===== FOOTER ===== */
    .footer {
        padding: 3rem 0 0;
    }

    .footer-main {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-bottom: 2rem;
    }

    .footer-brand {
        text-align: center;
        margin-bottom: 1rem;
    }

    .footer-brand h3 {
        font-size: 1.3rem;
        margin-bottom: 0.5rem;
    }

    .footer-brand p {
        font-size: 0.9rem;
        max-width: 100%;
    }

    .footer-links {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer-column {
        text-align: center;
    }

    .footer-column h4 {
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
    }

    .footer-column ul li {
        margin-bottom: 0.4rem;
    }

    .footer-column ul li a {
        font-size: 0.9rem;
    }

    .footer-bottom {
        padding: 1rem 0;
    }

    .footer-bottom-content {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .footer-version {
        font-size: 0.7rem;
    }

    /* ===== BLOG SPECIFIC ===== */
    .blog-hero {
        padding: 3rem 0;
    }

    .blog-hero-content h1 {
        font-size: 2.2rem;
    }

    .blog-hero-content p {
        font-size: 1rem;
    }

    .blog-stats {
        flex-direction: column;
        gap: 1.5rem;
    }

    .blog-stats .stat-number {
        font-size: 1.8rem;
    }

    .posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .post-card {
        margin-bottom: 1rem;
    }
}

    }

    .dropdown-menu a:hover {
        background-color: #e2e8f0;
        color: #2563eb;
    }
}

/* ===== DESKTOP STYLES (768px and above) ===== */
@media (min-width: 768px) {
    /* Ensure desktop navigation works correctly */
    .nav-menu {
        position: static;
        left: auto;
        top: auto;
        flex-direction: row;
        background-color: transparent;
        width: auto;
        text-align: left;
        box-shadow: none;
        padding: 0;
        gap: 2rem;
        z-index: auto;
        max-height: none;
        overflow: visible;
        display: flex;
        align-items: center;
    }

    .nav-item {
        margin: 0;
        border-bottom: none;
    }

    .nav-link {
        padding: 0.5rem 1rem;
        border-radius: 0.5rem;
        color: #374151;
        font-size: 1rem;
    }

    .nav-link:hover {
        background-color: rgba(59, 130, 246, 0.05);
        color: #2563eb;
    }

    .nav-link.active {
        background: rgba(59, 130, 246, 0.1);
        color: #2563eb;
        border-left: none;
    }

    .nav-link.active::after {
        content: '';
        position: absolute;
        bottom: -2px;
        left: 0;
        width: 100%;
        height: 2px;
        background-color: #2563eb;
        display: block;
    }

    .hamburger {
        display: none;
    }

    /* Desktop dropdown menu */
    .dropdown-menu {
        position: absolute;
        top: 100%;
        left: 0;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        background-color: white;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        border: none;
        border-radius: 0.5rem;
        margin: 0;
        padding: 0.5rem 0;
        min-width: 200px;
        border-left: none;
    }

    .dropdown:hover .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .dropdown-arrow {
        display: inline-block;
    }

    .dropdown-menu a {
        padding: 0.75rem 1rem;
        color: #374151;
        border-radius: 0;
        border-bottom: none;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 0.9rem;
    }

    .dropdown-menu a:hover {
        background-color: #f3f4f6;
        color: #2563eb;
    }
}

/* ===== ADDITIONAL MOBILE OPTIMIZATIONS ===== */
@media (max-width: 480px) {
    /* Extra small mobile optimizations */
    .container {
        padding: 0 0.75rem;
    }

    .hero-title {
        font-size: 1.75rem;
        line-height: 1.1;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .hero-badge {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }

    .cta-primary, .cta-secondary {
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .section-subtitle {
        font-size: 0.95rem;
    }

    .tool-card {
        padding: 1.25rem;
    }

    .tool-title {
        font-size: 1rem;
    }

    .tool-description {
        font-size: 0.85rem;
    }

    .nav-link {
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
    }

    .dropdown-menu a {
        padding: 0.625rem 1.75rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 360px) {
    /* Very small screens */
    .container {
        padding: 0 0.5rem;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .tool-card {
        padding: 1rem;
    }

    .nav-link {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

/* ===== TOUCH OPTIMIZATIONS ===== */
@media (hover: none) and (pointer: coarse) {
    /* Touch devices */
    .nav-link,
    .tool-btn,
    .cta-primary,
    .cta-secondary,
    .dropdown-menu a {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .tool-card {
        transition: transform 0.2s ease;
    }

    .tool-card:active {
        transform: scale(0.98);
    }
}

/* ===== LANDSCAPE MOBILE OPTIMIZATIONS ===== */
@media (max-width: 767px) and (orientation: landscape) {
    .hero {
        padding: 1.5rem 0;
        min-height: 40vh;
    }

    .hero-container {
        flex-direction: row;
        align-items: center;
        text-align: left;
    }

    .hero-content {
        flex: 1;
    }

    .hero-image {
        flex: 0 0 40%;
        order: 2;
    }

    .nav-menu {
        max-height: calc(100vh - 60px);
    }
}
