/* MODERN SERVICES SECTION - BENTO GRID LAYOUT */

/* =========================================
   CORE VARIABLES
   ========================================= */
:root {
    --services-cyan: #00b1e1;
    --services-orange: #ff9201;
    --services-gap: 20px;
}

body:not(.dark-mode) {
    --services-bg: #ffffff;
    --services-card-bg: #f8f8f8;
    --services-text: #0f0f0f;
    --services-text-muted: #666666;
    --services-border: rgba(0, 0, 0, 0.05);
}

.dark-mode {
    --services-bg: #0f0f0f;
    --services-card-bg: #161616;
    --services-text: #ffffff;
    --services-text-muted: #a0a0a0;
    --services-border: rgba(255, 255, 255, 0.05);
}

/* =========================================
   SECTION LAYOUT
   ========================================= */
.services-modern {
    padding: 6rem 2rem;
    background: var(--services-bg);
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Floating Background Elements */
.services-floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 0;
}

.services-floating-shape {
    position: absolute;
    opacity: 0.4;
    animation: services-float-shapes 15s infinite ease-in-out;
}

.services-shape-1 {
    width: 120px;
    height: 120px;
    background: var(--gradient-2);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
    animation-duration: 12s;
}

.services-shape-2 {
    width: 80px;
    height: 80px;
    background: var(--gradient-1);
    border-radius: 50%;
    top: 70%;
    right: 15%;
    animation-delay: -4s;
    animation-duration: 16s;
}

.services-shape-3 {
    width: 100px;
    height: 100px;
    background: var(--gradient-3);
    border-radius: 20px;
    transform: rotate(45deg);
    bottom: 25%;
    left: 5%;
    animation-delay: -8s;
    animation-duration: 14s;
}

.services-shape-4 {
    width: 60px;
    height: 60px;
    background: var(--gradient-4);
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    top: 40%;
    right: 5%;
    animation-delay: -2s;
    animation-duration: 18s;
}

.services-shape-5 {
    width: 90px;
    height: 90px;
    background: var(--gradient-5);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    top: 20%;
    right: 25%;
    animation-delay: -6s;
    animation-duration: 13s;
}

.services-shape-6 {
    width: 70px;
    height: 70px;
    background: var(--gradient-1);
    border-radius: 40% 60% 60% 40% / 40% 40% 60% 60%;
    bottom: 15%;
    right: 30%;
    animation-delay: -10s;
    animation-duration: 15s;
}

.services-shape-7 {
    width: 110px;
    height: 110px;
    background: var(--gradient-2);
    border-radius: 20% 80% 80% 20% / 20% 20% 80% 80%;
    top: 55%;
    left: 20%;
    animation-delay: -5s;
    animation-duration: 17s;
}

.services-shape-8 {
    width: 85px;
    height: 85px;
    background: var(--gradient-3);
    border-radius: 50%;
    bottom: 40%;
    right: 8%;
    animation-delay: -12s;
    animation-duration: 14s;
}

@keyframes services-float-shapes {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
        opacity: 0.4;
    }
    25% {
        transform: translate(40px, -30px) rotate(120deg) scale(1.2);
        opacity: 0.6;
    }
    50% {
        transform: translate(-30px, 40px) rotate(240deg) scale(0.8);
        opacity: 0.3;
    }
    75% {
        transform: translate(-20px, -40px) rotate(300deg) scale(1.1);
        opacity: 0.5;
    }
}

/* Floating Particles */
.services-floating-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 0;
}

.services-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--services-orange);
    border-radius: 50%;
    opacity: 0.7;
    animation: services-particle-rise 8s infinite linear;
}

.services-particle:nth-child(1) { left: 10%; animation-delay: 0s; }
.services-particle:nth-child(2) { left: 20%; animation-delay: -1s; background: var(--services-cyan); }
.services-particle:nth-child(3) { left: 30%; animation-delay: -2s; }
.services-particle:nth-child(4) { left: 40%; animation-delay: -3s; background: var(--services-cyan); }
.services-particle:nth-child(5) { left: 50%; animation-delay: -4s; }
.services-particle:nth-child(6) { left: 60%; animation-delay: -5s; background: var(--services-cyan); }
.services-particle:nth-child(7) { left: 70%; animation-delay: -6s; }
.services-particle:nth-child(8) { left: 80%; animation-delay: -7s; background: var(--services-cyan); }
.services-particle:nth-child(9) { left: 90%; animation-delay: -8s; }
.services-particle:nth-child(10) { left: 15%; animation-delay: -9s; background: var(--services-cyan); }
.services-particle:nth-child(11) { left: 45%; animation-delay: -10s; }
.services-particle:nth-child(12) { left: 75%; animation-delay: -11s; background: var(--services-cyan); }

@keyframes services-particle-rise {
    0% {
        transform: translateY(100vh) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) translateX(100px) rotate(180deg);
        opacity: 0;
    }
}

/* Header */
.services-header {
    text-align: center;
    max-width: 900px;
    margin-bottom: 4rem;
    position: relative;
    z-index: 2;
}

.services-header h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    text-transform: uppercase;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    color: var(--services-text);
}

.services-gradient-text {
    background: linear-gradient(135deg, var(--services-cyan), var(--services-orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.services-intro-wrapper {
    max-width: 800px;
    margin: 0 auto 3rem;
    position: relative;
    padding: 2.5rem 3rem;
    border-radius: 20px;
    background: var(--services-card-bg);
    border: 1px solid var(--services-border);
}

.services-intro-wrapper::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 20px;
    padding: 2px;
    background: linear-gradient(135deg, var(--services-cyan), var(--services-orange));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.3;
    animation: services-intro-glow 3s ease-in-out infinite;
}

@keyframes services-intro-glow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

.services-intro-wrapper p {
    font-size: 1.15rem;
    line-height: 2;
    color: var(--services-text-muted);
    margin: 0 0 1.5rem 0;
    font-weight: 300;
    letter-spacing: 0.01em;
}

.services-intro-wrapper p:last-child {
    margin-bottom: 0;
}

.services-intro-wrapper em {
    font-style: normal;
    color: var(--services-text);
    font-weight: 400;
}

/* =========================================
   BENTO GRID
   ========================================= */
.services-bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--services-gap);
    width: 100%;
    max-width: 1600px;
    margin-bottom: 4rem;
    position: relative;
    z-index: 2;
}

/* =========================================
   CARD STYLING
   ========================================= */
.services-card {
    background: var(--services-card-bg);
    border-radius: 24px;
    padding: 2rem;
    position: relative;
    border: 1px solid var(--services-border);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.1s ease, box-shadow 0.3s ease;
    transform-style: preserve-3d;
    perspective: 1000px;
}

/* Glowing Border on Hover */
.services-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 24px;
    padding: 2px;
    background: linear-gradient(135deg, rgba(0,177,225,0), rgba(255,146,1,0));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    transition: 0.4s ease;
    pointer-events: none;
}

.services-card:hover::after {
    background: linear-gradient(135deg, var(--services-cyan), var(--services-orange));
}

.services-card:hover {
    box-shadow: 0 10px 40px -10px rgba(0, 177, 225, 0.15);
}

/* Icons */
.services-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: rgba(255,255,255,0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    transform: translateZ(20px);
}

.dark-mode .services-icon-wrapper {
    background: rgba(255,255,255,0.03);
}

body:not(.dark-mode) .services-icon-wrapper {
    background: rgba(0,0,0,0.03);
}

.icon-cyan { color: var(--services-cyan); }
.icon-orange { color: var(--services-orange); }

.services-card-title {
    font-size: 1.25rem;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    transform: translateZ(10px);
    color: var(--services-text);
}

.services-card-desc {
    transform: translateZ(5px);
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--services-text-muted);
}

/* Special Card Sizes */
.span-2-col { grid-column: span 2; }
.span-2-row { grid-row: span 2; }

.services-card-link {
    margin-top: auto;
    padding-top: 20px;
    color: var(--services-orange);
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-block;
}

/* =========================================
   PACKAGES SECTION
   ========================================= */
.services-packages-modern {
    width: 100%;
    max-width: 1600px;
    background: linear-gradient(180deg, rgba(255,255,255,0.02) 0%, rgba(0,0,0,0) 100%);
    border: 1px solid var(--services-border);
    border-radius: 30px;
    padding: 3rem;
    text-align: center;
    position: relative;
    z-index: 2;
}

body:not(.dark-mode) .services-packages-modern {
    background: linear-gradient(180deg, rgba(0,0,0,0.02) 0%, rgba(0,0,0,0) 100%);
}

.services-packages-modern h3 {
    color: var(--services-orange);
    font-size: 2rem;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.services-packages-modern > p {
    color: var(--services-text-muted);
    margin-bottom: 2rem;
}

.services-packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.services-pkg-card {
    background: var(--services-card-bg);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid var(--services-border);
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.services-pkg-card:hover {
    border-color: var(--services-cyan);
    transform: translateY(-5px);
}

.services-pkg-card i {
    font-size: 2rem;
}

.services-pkg-card h4 {
    font-weight: 700;
    color: var(--services-text);
}

.services-btn-group {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.services-btn {
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: 0.3s;
    cursor: pointer;
    border: none;
    display: inline-block;
}

.services-btn-glow {
    background: var(--services-text);
    color: var(--services-bg);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.services-btn-glow:hover {
    background: var(--services-cyan);
    color: #fff;
    box-shadow: 0 0 30px rgba(0, 177, 225, 0.6);
}

.services-btn-outline {
    background: transparent;
    color: var(--services-text);
    border: 2px solid var(--services-border);
}

.services-btn-outline:hover {
    border-color: var(--services-orange);
    color: var(--services-orange);
}

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

/* Small Mobiles (320px - 480px) */
@media (max-width: 480px) {
    .services-modern { padding: 4rem 1.5rem; }
    .services-bento-grid { grid-template-columns: 1fr; gap: 1rem; }
    .span-2-col { grid-column: span 1; }
    .span-2-row { grid-row: span 1; }
    .services-header h2 { font-size: 2rem; }
    .services-card { padding: 1.5rem; }
    .services-packages-modern { padding: 2rem 1.5rem; }
}

/* Medium Mobiles (481px - 600px) */
@media (min-width: 481px) and (max-width: 600px) {
    .services-bento-grid { grid-template-columns: 1fr; }
    .span-2-col { grid-column: span 1; }
    .span-2-row { grid-row: span 1; }
}

/* Large Mobiles (601px - 768px) */
@media (min-width: 601px) and (max-width: 768px) {
    .services-bento-grid { grid-template-columns: repeat(2, 1fr); }
    .span-2-col { grid-column: span 2; }
    .span-2-row { grid-row: span 1; }
}

/* Small Tablets (769px - 900px) */
@media (min-width: 769px) and (max-width: 900px) {
    .services-bento-grid { grid-template-columns: repeat(2, 1fr); }
    .span-2-col { grid-column: span 2; }
    .span-2-row { grid-row: span 2; }
}

/* Medium Tablets (901px - 1024px) */
@media (min-width: 901px) and (max-width: 1024px) {
    .services-bento-grid { grid-template-columns: repeat(3, 1fr); }
    .span-2-col { grid-column: span 2; }
    .span-2-row { grid-row: span 2; }
}

/* Large Tablets (1025px - 1280px) */
@media (min-width: 1025px) and (max-width: 1280px) {
    .services-bento-grid { grid-template-columns: repeat(4, 1fr); }
}

/* Small Laptops (1281px - 1440px) */
@media (min-width: 1281px) and (max-width: 1440px) {
    .services-bento-grid { grid-template-columns: repeat(4, 1fr); }
}

/* Medium Laptops (1441px - 1600px) */
@media (min-width: 1441px) and (max-width: 1600px) {
    .services-bento-grid { grid-template-columns: repeat(4, 1fr); }
}

/* Large Laptops / Small Monitors (1601px - 1920px) */
@media (min-width: 1601px) and (max-width: 1920px) {
    .services-bento-grid, .services-packages-modern {
        max-width: 85%;
    }
    .services-bento-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Medium Monitors (1921px - 2560px) */
@media (min-width: 1921px) and (max-width: 2560px) {
    .services-bento-grid, .services-packages-modern {
        max-width: 90%;
    }
    .services-bento-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 1.5rem;
    }
}

/* Large Monitors / Ultrawides (2561px - 3440px) */
@media (min-width: 2561px) and (max-width: 3440px) {
    .services-modern {
        min-height: 100vh;
        justify-content: center;
    }
    .services-bento-grid {
        grid-template-columns: repeat(6, 1fr);
        max-width: 2800px;
        gap: 2rem;
    }
    .services-packages-modern {
        max-width: 2800px;
    }
    .services-header h2 { font-size: 4rem; }
}

/* 49" Odyssey OLED G9 (3441px - 5120px) */
@media (min-width: 3441px) and (max-width: 5120px) {
    .services-modern {
        min-height: 100vh;
        justify-content: center;
    }
    .services-bento-grid {
        grid-template-columns: repeat(6, 1fr);
        max-width: 3000px;
        gap: 2rem;
    }
    .services-packages-modern {
        max-width: 3000px;
    }
    body { font-size: 18px; }
    .services-header h2 { font-size: 5rem; }
}

/* 57" Odyssey Neo G9 (5121px+) */
@media (min-width: 5121px) {
    .services-modern {
        min-height: 100vh;
        justify-content: center;
    }
    .services-bento-grid {
        grid-template-columns: repeat(6, 1fr);
        max-width: 3500px;
        gap: 2.5rem;
    }
    .services-packages-modern {
        max-width: 3500px;
    }
    body { font-size: 20px; }
    .services-header h2 { font-size: 6rem; }
}

/* Vertical Monitors (Portrait) */
@media (orientation: portrait) and (min-width: 1080px) {
    .services-bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .span-2-col { grid-column: span 2; }
}

/* Horizontal Monitors (Landscape) - Ultrawide optimization */
@media (orientation: landscape) and (min-aspect-ratio: 21/9) {
    .services-bento-grid {
        gap: 2rem;
    }
}
