/* ===================================
   RESPONSIVE DESIGN STYLES
   =================================== */

/* ===================================
   LARGE DESKTOP - 1440px and above
   =================================== */
@media (min-width: 1440px) {
    .container {
        max-width: 1400px;
    }
    
    /* Hero Section */
    .hero-title {
        font-size: 5rem;
    }
    
    .hero-description {
        font-size: 1.25rem;
    }
    
    .tech-dashboard {
        max-width: 450px;
    }
    
    /* Services */
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 3rem;
    }
    
    /* Portfolio */
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 3rem;
    }
    
    /* Stats */
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 3rem;
    }
    
    .stat-number {
        font-size: 4rem;
    }
}

/* ===================================
   DESKTOP - 1200px to 1439px
   =================================== */
@media (min-width: 1200px) and (max-width: 1439px) {
    .container {
        max-width: 1200px;
    }
    
    /* Hero adjustments */
    .hero-title {
        font-size: 4rem;
    }
    
    .tech-dashboard {
        max-width: 400px;
    }
    
    /* Grid layouts */
    .services-grid,
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2.5rem;
    }
}

/* ===================================
   LAPTOP - 1024px to 1199px
   =================================== */
@media (min-width: 1025px) and (max-width: 1199px) {
    .container {
        max-width: 1024px;
        padding: 0 1.5rem;
    }
    
    /* Navigation */
    .nav-menu {
        gap: 1.5rem;
    }
    
    .nav-link {
        font-size: 0.9rem;
    }
    
    /* Hero Section */
    .hero-content {
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .hero-image {
        width: 350px;
        height: 350px;
    }
    
    .tech-dashboard {
        max-width: 350px;
        padding: 1.5rem;
    }
    
    /* Services */
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 2rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    /* Portfolio */
    .portfolio-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 2rem;
    }
    
    .portfolio-image {
        height: 220px;
    }
    
    /* Stats */
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    /* Testimonials */
    .testimonial-content {
        padding: 2rem;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 2fr 1fr 1fr 1fr;
        gap: 2rem;
    }
}

/* ===================================
   TABLET LANDSCAPE - 769px to 1024px
   =================================== */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }
    
    /* Navigation */
    .nav-menu {
        gap: 1rem;
    }
    
    .nav-cta .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    /* Hero Section */
    .hero {
        min-height: 90vh;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-description {
        font-size: 1rem;
        max-width: 600px;
        margin: 0 auto;
    }
    
    .hero-image {
        width: 300px;
        height: 300px;
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        margin: 0 auto;
    }
    
    .tech-dashboard {
        max-width: 300px;
    }
    
    .cta-buttons {
        justify-content: center;
    }
    
    /* Services */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    .service-icon {
        width: 70px;
        height: 70px;
    }
    
    /* Portfolio */
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .portfolio-image {
        height: 200px;
    }
    
    /* Stats */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .stat-item {
        padding: 1.5rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    /* Testimonials */
    .testimonial-content {
        padding: 1.5rem;
    }
    
    .testimonial-author {
        flex-direction: row;
        gap: 1rem;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 2fr 1fr 1fr;
        gap: 1.5rem;
    }
    
    .footer-section:last-child {
        grid-column: 1 / -1;
        margin-top: 1rem;
    }
    
    /* CTA Section */
    .cta-actions {
        flex-direction: row;
        justify-content: center;
    }
    
    .cta-actions .btn {
        min-width: 200px;
    }
}

/* ===================================
   TABLET PORTRAIT - 481px to 768px
   =================================== */
@media (min-width: 481px) and (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    /* Mobile Navigation */
    .mobile-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 100%;
        left: 0;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        padding: 2rem;
        gap: 0;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        z-index: 999;
    }
    
    .nav-menu.active {
        transform: translateX(0);
    }
    
    .nav-item {
        width: 100%;
        border-bottom: 1px solid var(--gray-light);
    }
    
    .nav-link {
        width: 100%;
        padding: 1rem;
        font-size: 1.1rem;
        justify-content: space-between;
        border-radius: 0;
    }
    
    .nav-cta {
        margin: 1rem 0 0 0;
        padding-top: 1rem;
        border-top: 1px solid var(--gray-light);
    }
    
    .nav-cta .btn {
        width: 100%;
        justify-content: center;
        padding: 1rem;
        font-size: 1.1rem;
    }
    
    /* Hero Section */
    .hero {
        min-height: 100vh;
        padding: 4rem 0 2rem;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-features {
        justify-content: center;
        gap: 1rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .hero-actions .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .hero-image {
        width: 250px;
        height: 250px;
    }
    
    .tech-dashboard {
        max-width: 250px;
        padding: 1rem;
    }
    
    /* Sections */
    .section {
        padding: 3rem 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .section-description {
        font-size: 1rem;
    }
    
    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    .service-card.featured {
        order: -1;
        transform: none;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
    }
    
    .service-title {
        font-size: 1.25rem;
    }
    
    /* Portfolio */
    .portfolio-filters {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .portfolio-image {
        height: 200px;
    }
    
    .portfolio-content {
        padding: 1rem;
    }
    
    .portfolio-content h3 {
        font-size: 1.25rem;
    }
    
    /* Stats */
    .stats {
        padding: 3rem 0;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .stat-item {
        padding: 1rem;
    }
    
    .stat-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.9rem;
    }
    
    /* Testimonials */
    .testimonials {
        padding: 3rem 0;
    }
    
    .testimonial-content {
        padding: 1.5rem;
    }
    
    .testimonial-text {
        font-size: 1rem;
        text-align: left;
    }
    
    .testimonial-author {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .testimonial-author img {
        width: 60px;
        height: 60px;
    }
    
    .author-info {
        text-align: center;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
        padding: 3rem 0 2rem;
    }
    
    .footer-section:first-child {
        grid-column: 1 / -1;
        text-align: center;
        margin-bottom: 1rem;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    /* CTA Section */
    .cta-section {
        padding: 3rem 0;
    }
    
    .cta-title {
        font-size: 2rem;
    }
    
    .cta-actions {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .cta-actions .btn {
        width: 100%;
        max-width: 300px;
    }
}

/* ===================================
   MOBILE LARGE - 376px to 480px
   =================================== */
@media (min-width: 376px) and (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    /* Hero */
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 0.9rem;
    }
    
    .hero-image {
        width: 200px;
        height: 200px;
    }
    
    .tech-dashboard {
        max-width: 200px;
    }
    
    /* Services */
    .service-card {
        padding: 1rem;
    }
    
    .service-icon {
        width: 50px;
        height: 50px;
    }
    
    .service-title {
        font-size: 1.1rem;
    }
    
    /* Portfolio */
    .portfolio-image {
        height: 180px;
    }
    
    /* Stats */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-item {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    /* Testimonials */
    .testimonial-content {
        padding: 1rem;
    }
    
    .testimonial-text {
        font-size: 0.9rem;
    }
    
    .testimonial-author img {
        width: 50px;
        height: 50px;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 2rem 0 1rem;
    }
    
    .footer-section {
        text-align: center;
    }
    
    .social-links {
        gap: 0.5rem;
    }
    
    .social-link {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* ===================================
   MOBILE SMALL - 320px to 375px
   =================================== */
@media (max-width: 375px) {
    .container {
        padding: 0 0.75rem;
    }
    
    /* Navigation */
    .logo-text {
        font-size: 1.25rem;
    }
    
    .mobile-toggle {
        width: 20px;
        height: 15px;
    }
    
    .mobile-toggle span {
        height: 2px;
    }
    
    /* Hero */
    .hero {
        min-height: 100vh;
        padding: 3rem 0 1rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
        margin-bottom: 0.75rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .hero-description {
        font-size: 0.85rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-features {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .hero-actions .btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .hero-image {
        width: 180px;
        height: 180px;
    }
    
    .tech-dashboard {
        max-width: 180px;
        padding: 0.75rem;
    }
    
    .metric-card {
        padding: 0.75rem;
    }
    
    .metric-icon {
        width: 35px;
        height: 35px;
    }
    
    .metric-value {
        font-size: 1.25rem;
    }
    
    /* Sections */
    .section {
        padding: 2rem 0;
    }
    
    .section-title {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }
    
    .section-subtitle {
        font-size: 0.75rem;
    }
    
    .section-description {
        font-size: 0.9rem;
    }
    
    /* Services */
    .service-card {
        padding: 0.75rem;
    }
    
    .service-icon {
        width: 45px;
        height: 45px;
        margin-bottom: 0.75rem;
    }
    
    .service-icon i {
        font-size: 1.25rem;
    }
    
    .service-title {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .service-description {
        font-size: 0.85rem;
    }
    
    .service-features li {
        font-size: 0.8rem;
        padding: 0.25rem 0;
    }
    
    .service-link {
        width: 100%;
        justify-content: center;
        font-size: 0.85rem;
    }
    
    /* Portfolio */
    .filter-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .portfolio-filters {
        flex-direction: column;
        align-items: center;
    }
    
    .portfolio-image {
        height: 160px;
    }
    
    .portfolio-content {
        padding: 0.75rem;
    }
    
    .portfolio-content h3 {
        font-size: 1rem;
    }
    
    .portfolio-content p {
        font-size: 0.8rem;
    }
    
    .portfolio-link {
        width: 35px;
        height: 35px;
    }
    
    /* Stats */
    .stat-item {
        padding: 0.75rem;
    }
    
    .stat-icon {
        width: 45px;
        height: 45px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    /* Testimonials */
    .testimonial-content {
        padding: 0.75rem;
    }
    
    .testimonial-text {
        font-size: 0.85rem;
        line-height: 1.5;
    }
    
    .testimonial-author img {
        width: 45px;
        height: 45px;
    }
    
    .author-info h4 {
        font-size: 0.9rem;
    }
    
    .author-info span {
        font-size: 0.75rem;
    }
    
    .testimonial-prev,
    .testimonial-next {
        width: 35px;
        height: 35px;
    }
    
    .dot {
        width: 8px;
        height: 8px;
    }
    
    /* Footer */
    .footer-content {
        padding: 1.5rem 0 1rem;
    }
    
    .footer-title {
        font-size: 1.25rem;
    }
    
    .footer-subtitle {
        font-size: 1rem;
    }
    
    .footer-description,
    .footer-links a,
    .contact-item {
        font-size: 0.85rem;
    }
    
    .social-link {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .footer-bottom {
        padding: 1rem 0;
    }
    
    .footer-bottom p,
    .footer-bottom-links a {
        font-size: 0.75rem;
    }
    
    /* CTA Section */
    .cta-section {
        padding: 2rem 0;
    }
    
    .cta-title {
        font-size: 1.5rem;
    }
    
    .cta-description {
        font-size: 0.9rem;
    }
    
    .cta-actions .btn {
        width: 100%;
        padding: 0.75rem;
        font-size: 0.9rem;
    }
}

/* ===================================
   LANDSCAPE ORIENTATION ADJUSTMENTS
   =================================== */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        height: auto;
        min-height: 100vh;
        padding: 4rem 0 2rem;
    }
    
    .hero-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
        align-items: center;
    }
    
    .hero-image {
        width: 200px;
        height: 200px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    .hero-actions {
        flex-direction: row;
        gap: 1rem;
    }
    
    .hero-actions .btn {
        min-width: 150px;
        padding: 0.75rem 1rem;
    }
}

/* ===================================
   PRINT STYLES
   =================================== */
@media print {
    * {
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
        background: #fff;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    /* Hide navigation and interactive elements */
    .navbar,
    .mobile-toggle,
    .hero-actions,
    .filter-btn,
    .portfolio-link,
    .testimonial-controls,
    .social-links,
    .cta-actions,
    .back-to-top {
        display: none !important;
    }
    
    /* Adjust sections for print */
    .section {
        padding: 1rem 0;
        break-inside: avoid;
    }
    
    .hero {
        height: auto;
        padding: 2rem 0;
        background: #fff;
        color: #000;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-title {
        color: #000;
        font-size: 2rem;
    }
    
    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .service-card {
        break-inside: avoid;
        border: 1px solid #ccc;
        background: #fff;
    }
    
    /* Portfolio */
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .portfolio-item {
        break-inside: avoid;
        border: 1px solid #ccc;
    }
    
    /* Stats */
    .stats {
        background: #fff;
        color: #000;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .stat-item {
        border: 1px solid #ccc;
        background: #fff;
    }
    
    .stat-number {
        color: #000;
    }
    
    /* Testimonials */
    .testimonial-item {
        display: block !important;
        opacity: 1 !important;
        break-inside: avoid;
        margin-bottom: 1rem;
    }
    
    /* Footer */
    .footer {
        background: #fff;
        color: #000;
        border-top: 2px solid #000;
    }
    
    .footer-content {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .footer-title {
        color: #000;
    }
}

/* ===================================
   HIGH CONTRAST MODE
   =================================== */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0000ff;
        --secondary-color: #ff0000;
        --accent-color: #00ffff;
        --dark-color: #000000;
        --white: #ffffff;
        --gray-dark: #333333;
        --gray-medium: #666666;
        --gray-light: #cccccc;
    }
    
    .service-card,
    .portfolio-item,
    .stat-item,
    .testimonial-content {
        border: 2px solid var(--dark-color);
    }
    
    .btn {
        border: 2px solid var(--dark-color);
    }
    
    .social-link {
        border: 2px solid var(--white);
    }
}

/* ===================================
   REDUCED MOTION
   =================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .hero::before,
    .tech-dashboard,
    .scroll-indicator {
        animation: none;
    }
    
    .service-card:hover,
    .portfolio-item:hover,
    .stat-item:hover {
        transform: none;
    }
}

/* ===================================
   DARK MODE SUPPORT
   =================================== */
@media (prefers-color-scheme: dark) {
    :root {
        --white: #1a1a1a;
        --light-color: #2d2d2d;
        --gray-light: #404040;
        --gray-medium: #888888;
    }
    
    .services,
    .portfolio,
    .testimonials {
        background: var(--dark-color);
    }
    
    .service-card,
    .portfolio-item,
    .testimonial-content {
        background: var(--dark-secondary);
        border-color: rgba(255, 255, 255, 0.1);
    }
}