/* ==========================================
   Nexora — Shared Design System & Components
   ========================================== */

/* ==========================================
   1. CSS Variables
   ========================================== */
:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary: #0f172a;
    --accent: #06b6d4;
    --bg: #ffffff;
    --surface: #f8fafc;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --border-light: rgba(15, 23, 42, 0.08);
    --border-focus: rgba(37, 99, 235, 0.3);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05),
        0 4px 6px -2px rgba(0, 0, 0, 0.025);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.05),
        0 10px 10px -5px rgba(0, 0, 0, 0.02);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================
   2. Reset & Base Styles
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none !important;
    color: inherit;
    transition: var(--transition-smooth);
}

/* ==========================================
   3. Typography
   ========================================== */
h1, h2, h3, h4, h5 {
    color: var(--secondary);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 2vw, 2rem); }
p  { color: var(--text-secondary); font-size: 1.125rem; }

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

/* ==========================================
   4. Layout & Utilities
   ========================================== */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-padding { padding: 8rem 0; }
.text-center    { text-align: center; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-8 { margin-bottom: 4rem; }

/* ==========================================
   5. Buttons — Override Bootstrap
   ========================================== */
.btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm) !important;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth) !important;
    border: 1px solid transparent !important;
    gap: 0.4rem;
    font-size: 0.9rem;
    line-height: 1.4;
    text-decoration: none !important;
    box-shadow: none;
    white-space: nowrap !important;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.39);
}

.btn-primary:hover {
    background: var(--primary-hover);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.23);
}

.btn-outline {
    background: transparent;
    color: var(--secondary);
    border: 1px solid var(--border-light) !important;
}

.btn-outline:hover {
    border-color: var(--secondary) !important;
    background: var(--surface);
}

.btn-white {
    background: white;
    color: var(--primary);
}

.btn-white:hover {
    background: var(--surface);
    transform: translateY(-2px);
}

/* ==========================================
   6. Glassmorphism
   ========================================== */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* ==========================================
   7. Navigation
   ========================================== */
.navbar {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: var(--transition-smooth);
}

.navbar.scrolled {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-light);
    padding: 0.75rem 0;
}

.nav-container {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start;
    align-items: center;
    gap: 3.5rem;
}

.logo {
    font-size: 1.35rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--secondary);
}

.logo-icon {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.nav-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-left: auto;
}

.mobile-actions {
    display: none;
}

.mobile-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--secondary);
    cursor: pointer;
    padding: 0.5rem;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
}

/* ==========================================
   8. Page Header (Sub-pages)
   ========================================== */
.page-header {
    padding-top: 10rem;
    padding-bottom: 3rem;
}

/* ==========================================
   9. Hero Section (index.php)
   ========================================== */
.hero {
    position: relative;
    padding: 5rem 0 3rem;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(37, 99, 235, 0.1) 0%,
        rgba(6, 182, 212, 0.05) 50%,
        rgba(255, 255, 255, 0) 70%
    );
    z-index: -1;
    filter: blur(40px);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-content {
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    margin-top: 2.5rem;
    border-top: 1px solid var(--border-light);
    padding-top: 2rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary);
    margin-bottom: 2rem;
}

.hero-visual {
    position: relative;
}

.mockup-img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    transition: var(--transition-smooth);
}

.mockup-img:hover {
    transform: translateY(-10px) scale(1.02);
}

.floating-card {
    position: absolute;
    background: var(--bg);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: float 6s ease-in-out infinite;
}

.fc-1 { bottom: -20px; left: -40px; }
.fc-2 { top: 40px; right: -30px; animation-delay: 2s; }

@keyframes float {
    0%   { transform: translateY(0px); }
    50%  { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

/* ==========================================
   10. Trusted By Section (index.php)
   ========================================== */
.trusted {
    padding: 4rem 0;
    background: var(--surface);
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

.trusted-label {
    text-align: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 2rem;
}

.logo-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    opacity: 0.6;
}

.logo-grid img {
    height: 30px;
    filter: grayscale(100%);
    transition: var(--transition-smooth);
}

.logo-grid img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* ==========================================
   11. Services Section
   ========================================== */
/* --- Index.php service cards --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.service-card {
    padding: 2.5rem;
    background: var(--bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: rgba(37, 99, 235, 0.2);
}

.service-icon {
    width: 56px;
    height: 56px;
    background: var(--surface);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-bottom: 1.5rem;
    transition: var(--transition-smooth);
}

.service-card:hover .service-icon {
    background: var(--primary);
    color: white;
}

.service-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-weight: 500;
    margin-top: 1.5rem;
    font-size: 0.9rem;
}

.service-link:hover { gap: 0.75rem; }

/* --- Services.php premium cards --- */
.services-showcase {
    padding-bottom: 6rem;
}

.services-grid-premium {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.premium-service-card {
    padding: 2.5rem;
    background: var(--bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.premium-service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: rgba(37, 99, 235, 0.2);
}

.ps-icon-wrapper {
    width: 56px;
    height: 56px;
    background: var(--surface);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-bottom: 1.5rem;
    transition: var(--transition-smooth);
}

.premium-service-card:hover .ps-icon-wrapper {
    background: var(--primary);
    color: white;
}

.ps-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-weight: 500;
    margin-top: 1.5rem;
    font-size: 0.9rem;
}

.ps-link:hover { gap: 0.75rem; }

/* ==========================================
   12. Pricing Section
   ========================================== */
.pricing {
    background: var(--surface);
}

.toggle-container {
    display: inline-flex;
    background: var(--surface);
    border-radius: 50px;
    padding: 0.25rem;
    border: 1px solid var(--border-light);
    margin-bottom: 3rem;
}

.toggle-btn {
    padding: 0.6rem 1.5rem;
    border: none;
    background: transparent;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
    font-family: 'Inter', sans-serif;
}

.toggle-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.toggle-btn:hover:not(.active) {
    color: var(--primary);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
    align-items: center;
}

.pricing-card {
    background: var(--bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    transition: var(--transition-smooth);
    text-align: left;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.pricing-card.popular {
    border: 2px solid var(--primary);
    box-shadow: var(--shadow-lg);
    transform: scale(1.05);
    position: relative;
}

.pricing-card.popular:hover {
    transform: scale(1.05) translateY(-5px);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.price {
    font-size: 3rem;
    font-weight: 800;
    color: var(--secondary);
    margin: 1rem 0;
    display: flex;
    align-items: baseline;
}

.price span {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.billing-period {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.feature-list {
    list-style: none;
    margin: 2rem 0;
    padding: 0;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.feature-list li i {
    color: var(--primary);
    flex-shrink: 0;
}

/* ==========================================
   13. Portfolio / Gallery Section
   ========================================== */
/* --- Index.php portfolio cards --- */
.portfolio-section {
    background: var(--bg);
    padding: 6rem 0;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.portfolio-card {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
    border: 1px solid var(--border-light);
}

.portfolio-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.portfolio-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.portfolio-content {
    padding: 1.5rem;
}

.portfolio-category {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

/* --- Gallery.php Bento Grid --- */
.portfolio-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
}

.portfolio-filters {
    display: flex;
    gap: 0.5rem;
    background: var(--surface);
    padding: 0.25rem;
    border-radius: 50px;
    border: 1px solid var(--border-light);
}

.filter-btn {
    padding: 0.5rem 1.25rem;
    border: none;
    background: transparent;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
    font-family: 'Inter', sans-serif;
}

.filter-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.filter-btn:hover:not(.active) {
    color: var(--primary);
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.bento-item {
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.bento-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.bento-item:hover img {
    transform: scale(1.05);
}

.bento-large {
    grid-column: span 8;
    grid-row: span 2;
    min-height: 500px;
}

.bento-tall {
    grid-column: span 4;
    grid-row: span 2;
    min-height: 500px;
}

.bento-wide {
    grid-column: span 8;
    min-height: 300px;
}

.bento-square {
    grid-column: span 4;
    min-height: 300px;
}

.bento-overlay {
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transform: translateY(10px);
    opacity: 0;
    transition: var(--transition-smooth);
}

.bento-item:hover .bento-overlay {
    transform: translateY(0);
    opacity: 1;
}

.overlay-content h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.overlay-content p {
    font-size: 0.8rem;
    margin: 0;
}

.bento-icon {
    width: 44px;
    height: 44px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transform: rotate(-45deg);
}

.bento-item.hide {
    display: none;
}

/* ==========================================
   14. Testimonials Section (index.php)
   ========================================== */
.testimonials-section {
    background: var(--surface);
    padding: 6rem 0;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.testimonial-card {
    background: var(--bg);
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 1.5rem;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

/* ==========================================
   15. CTA Section (index.php)
   ========================================== */
.cta-section {
    background: linear-gradient(135deg, var(--primary), #1e40af);
    padding: 5rem 0;
    color: white;
    text-align: center;
    border-radius: var(--radius-lg);
    margin: 4rem auto;
    max-width: calc(100% - 4rem);
}

.cta-section h2 { color: white; }

.cta-section p {
    color: rgba(255, 255, 255, 0.8);
    margin: 1.5rem auto 2.5rem;
    max-width: 600px;
}

/* ==========================================
   16. Contact Section (contact.php)
   ========================================== */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    align-items: start;
}

.contact-info-group {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-card {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    transition: var(--transition-smooth);
}

.info-card:hover {
    border-color: rgba(37, 99, 235, 0.2);
    box-shadow: var(--shadow-sm);
}

.info-icon {
    width: 48px;
    height: 48px;
    background: rgba(37, 99, 235, 0.1);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}

.info-content h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.info-content p {
    font-size: 0.95rem;
    margin: 0;
}

.social-card {
    padding: 1.5rem;
    background: var(--surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.social-card h4 {
    margin-bottom: 0.5rem;
}

.social-links {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.social-link {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: var(--bg);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.social-link:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.contact-form-wrapper {
    background: var(--bg);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.form-group.full-width {
    grid-column: span 2;
}

.contact-form-wrapper .form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.contact-form-wrapper .form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    background: var(--surface);
}

.contact-form-wrapper .form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: var(--bg);
}

.contact-form-wrapper textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

.form-success {
    display: none;
    text-align: center;
    padding: 3rem 2rem;
}

.form-success-icon {
    width: 64px;
    height: 64px;
    background: rgba(34, 197, 94, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #22c55e;
    margin: 0 auto 1.5rem;
}

/* ==========================================
   17. Footer
   ========================================== */
.footer {
    border-top: 1px solid #222;
    padding: 5rem 0 2rem;
    background: #000;
    color: #fff;
}

.footer p, .footer span, .footer li, .footer a {
    color: rgba(255, 255, 255, 0.7) !important;
}

.footer h4, .footer .logo {
    color: #fff !important;
}

.footer a:hover {
    color: #fff !important;
}

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

.footer-col h4 {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid #222;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

/* ==========================================
   18. Scroll Reveal Animations
   ========================================== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================
   19. Responsive — 1024px (Tablet Landscape)
   ========================================== */
@media (max-width: 1024px) {
    /* Hero */
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-content { margin: 0 auto; }
    .hero-buttons { justify-content: center; }
    .hero-stats   { justify-content: center; }

    /* Pricing */
    .pricing-grid { grid-template-columns: repeat(2, 1fr); }
    .pricing-card.popular { transform: scale(1); }
    .pricing-card.popular:hover { transform: translateY(-5px); }

    /* Services */
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .services-grid-premium { grid-template-columns: repeat(2, 1fr); }

    /* Bento */
    .bento-large, .bento-wide {
        grid-column: span 12;
        min-height: 450px;
    }
    .bento-tall, .bento-square {
        grid-column: span 6;
        min-height: 400px;
    }

    /* Contact */
    .contact-layout { gap: 2rem; }
}

/* ==========================================
   20. Responsive — 768px (Tablet Portrait)
   ========================================== */
@media (max-width: 768px) {
    /* Spacing */
    .section-padding { padding: 4rem 0; }
    .page-header { padding-top: 8rem; padding-bottom: 2rem; }
    .hero { padding: 9rem 0 4rem; }

    /* Typography */
    h1 { font-size: 2.25rem; }
    p  { font-size: 1rem; }

    /* Hamburger nav */
    .mobile-toggle { display: inline-flex; }
    .nav-actions   { display: none; }
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg);
        padding: 1rem 2rem 1.5rem;
        box-shadow: var(--shadow-md);
        border-top: 1px solid var(--border-light);
        gap: 0.25rem;
        z-index: 999;
    }
    .nav-links.active { display: flex; }
    .nav-links a:not(.btn) {
        padding: 0.6rem 0;
        font-size: 1rem;
        display: block;
        border-bottom: 1px solid var(--border-light);
    }
    .nav-links li:last-child a:not(.btn) { border-bottom: none; }

    .mobile-actions {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid var(--border-light);
    }

    .mobile-actions .btn {
        width: 100%;
        justify-content: center;
        margin: 0;
    }

    /* Hero */
    .hero-visual { display: none; }

    /* Grids */
    .pricing-grid { grid-template-columns: 1fr; }
    .services-grid { grid-template-columns: 1fr; }
    .services-grid-premium { grid-template-columns: 1fr; }

    /* Cards */
    .service-card { padding: 1.75rem; }
    .pricing-card { padding: 2rem 1.5rem; }
    .premium-service-card { padding: 2rem 1.5rem; }

    /* Contact */
    .contact-layout { grid-template-columns: 1fr; }
    .contact-form-wrapper { padding: 2rem; }
    .form-grid { grid-template-columns: 1fr; }
    .form-group.full-width { grid-column: span 1; }

    /* Gallery */
    .portfolio-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
    .portfolio-filters {
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        padding: 0.5rem;
        justify-content: flex-start;
        border-radius: var(--radius-md);
    }
    .filter-btn { flex-shrink: 0; }
    .bento-large, .bento-tall, .bento-wide, .bento-square {
        grid-column: span 12;
        grid-row: span 1;
        min-height: 300px;
    }
    .bento-overlay {
        transform: translateY(0);
        opacity: 1;
        bottom: 1rem;
        left: 1rem;
        right: 1rem;
        padding: 1rem;
    }
    .bento-icon { width: 40px; height: 40px; }

    /* Footer */
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
    .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }

    /* CTA */
    .cta-section {
        margin: 2rem 1rem;
        padding: 3rem 1.5rem;
        max-width: calc(100% - 2rem);
    }
    .cta-section .btn {
        width: 100%;
        max-width: 320px;
    }

    /* Portfolio images */
    .portfolio-img { height: 200px; }
}

/* ==========================================
   21. Responsive — 480px (Small Mobile)
   ========================================== */
@media (max-width: 480px) {
    /* Spacing */
    .container { padding: 0 1rem; }
    .section-padding { padding: 3rem 0; }
    .page-header { padding-top: 6rem; }
    .hero { padding: 7rem 0 3rem; }

    /* Typography */
    h1 { font-size: 2rem; }
    p  { font-size: 0.95rem; word-break: break-word; overflow-wrap: break-word; }

    /* Hero */
    .hero-badge { font-size: 0.75rem; }
    .hero-buttons {
        flex-direction: column;
        width: 100%;
        align-items: stretch;
    }
    .hero-buttons .btn { width: 100%; text-align: center; }
    .hero-stats {
        gap: 1.5rem;
        flex-direction: column;
        align-items: center;
    }

    /* Pricing */
    .pricing-card { padding: 1.75rem 1.25rem; }
    .toggle-container { flex-wrap: wrap; justify-content: center; }

    /* Services */
    .premium-service-card { padding: 1.75rem 1.25rem; }

    /* Gallery */
    .bento-large, .bento-tall, .bento-wide, .bento-square {
        min-height: 240px;
    }

    /* Contact */
    .contact-form-wrapper { padding: 1.5rem; }
    .social-links { flex-wrap: wrap; }

    /* Footer */
    .footer-grid { grid-template-columns: 1fr; }

    /* Buttons */
    .btn { min-height: 44px; max-width: 100%; }

    /* Portfolio */
    .portfolio-img { height: 180px; }
}

/* ==========================================
   22. Dashboard Layout
   ========================================== */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
    padding-top: 0;
    background: var(--surface);
    font-size: 0.875rem;
}

.dashboard-sidebar {
    width: 220px;
    background: var(--bg);
    border-right: 1px solid var(--border-light);
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 100;
    
    /* Hide scrollbar */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.dashboard-sidebar::-webkit-scrollbar {
    display: none;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 1rem;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
}

.sidebar-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-menu li {
    margin-bottom: 0.25rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.75rem;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.85rem;
    transition: var(--transition-smooth);
}

.sidebar-link:hover, .sidebar-link.active {
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary);
}

.dashboard-main {
    flex: 1;
    margin-left: 220px;
    padding: 2rem;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.dashboard-header h2 {
    font-size: clamp(1.4rem, 2.5vw, 1.75rem);
}

.dashboard-header p {
    font-size: 0.85rem;
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.25rem;
}

.template-card {
    background: var(--bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition-smooth);
    position: relative;
    display: flex;
    flex-direction: column;
}

.template-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(37, 99, 235, 0.3);
}

.template-img-wrap {
    position: relative;
    height: 155px;
    overflow: hidden;
}

.template-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.template-card:hover .template-img {
    transform: scale(1.05);
}

.template-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(15, 23, 42, 0.8);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
    z-index: 10;
}

.template-info {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.template-info h4 {
    font-size: 0.95rem !important;
    margin-bottom: 0.35rem !important;
}

.template-info p {
    font-size: 0.78rem !important;
    line-height: 1.45;
}

.template-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

.template-actions .btn {
    font-size: 0.78rem;
    padding: 0.3rem 0.7rem;
}

.template-actions a {
    font-size: 0.78rem !important;
}

/* Modal Styling overrides */
.modal-content {
    border-radius: var(--radius-md) !important;
    border: none !important;
    box-shadow: var(--shadow-lg) !important;
}
.modal-header {
    border-bottom: 1px solid var(--border-light) !important;
    padding: 1.5rem 1.5rem 1rem !important;
}
.modal-body {
    padding: 1.5rem !important;
}
.modal-footer {
    border-top: 1px solid var(--border-light) !important;
    padding: 1rem 1.5rem 1.5rem !important;
}

.form-label {
    font-weight: 600;
    color: var(--secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}
.form-control {
    border-radius: var(--radius-sm) !important;
    padding: 0.75rem 1rem !important;
    border: 1px solid var(--border-light) !important;
    box-shadow: none !important;
    font-size: 0.95rem;
}
.form-control:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1) !important;
}

/* Toast */
.custom-toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1060;
}
.custom-toast {
    background: var(--secondary);
    color: white;
    border-radius: var(--radius-sm);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-lg);
    transform: translateY(100px);
    opacity: 0;
    transition: var(--transition-smooth);
    pointer-events: none;
}
.custom-toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* ==========================================
   23. Full-Page Editor Layout
   ========================================== */

/* Editor Topbar */
.editor-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
    border-bottom: 1px solid var(--border-light);
    gap: 1rem;
    flex-shrink: 0;
    z-index: 50;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.editor-topbar-left {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.editor-back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--surface);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    transition: var(--transition-smooth);
    flex-shrink: 0;
}

.editor-back-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
    transform: translateX(-1px);
}

.editor-title-group {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.editor-title-group h4 {
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    color: var(--secondary);
    letter-spacing: -0.01em;
}

.editor-status {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    flex-shrink: 0;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.4);
}

.status-dot.unsaved {
    background: #f59e0b;
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.4);
    animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.editor-topbar-right {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.editor-topbar-right .btn-outline {
    background: var(--surface);
    border: 1px solid var(--border-light) !important;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.8rem;
    padding: 0.45rem 0.9rem;
    border-radius: var(--radius-sm) !important;
}

.editor-topbar-right .btn-outline:hover {
    background: #fff;
    border-color: var(--secondary) !important;
    color: var(--secondary);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.editor-topbar-right .btn-primary {
    font-weight: 600;
    font-size: 0.8rem;
    padding: 0.45rem 1rem;
    border-radius: var(--radius-sm) !important;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
    letter-spacing: 0.01em;
}

.editor-topbar-right .btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
    transform: translateY(-1px);
}

.editor-device-toggle {
    display: flex;
    background: var(--surface);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    overflow: hidden;
    padding: 2px;
    gap: 1px;
}

.device-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.device-btn:hover {
    color: var(--primary);
    background: rgba(37, 99, 235, 0.06);
}

.device-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

/* Editor Split Layout */
.editor-split {
    display: flex;
    height: calc(100vh - 57px);
    overflow: hidden;
}

.editor-form-panel {
    width: 480px;
    min-width: 360px;
    background: linear-gradient(180deg, #fafbfc 0%, #f5f7fa 100%);
    border-right: 1px solid var(--border-light);
    overflow-y: auto;
    flex-shrink: 0;
    
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.08) transparent;
}

.editor-form-panel::-webkit-scrollbar {
    width: 5px;
}
.editor-form-panel::-webkit-scrollbar-track {
    background: transparent;
}
.editor-form-panel::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.08);
    border-radius: 10px;
}
.editor-form-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.15);
}

.editor-form-inner {
    padding: 1.25rem 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Editor Sections */
.editor-section {
    padding: 1.25rem 1.35rem;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 14px;
    background: #ffffff;
    margin-bottom: 0.5rem;
    transition: var(--transition-smooth);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.editor-section:hover {
    border-color: rgba(37, 99, 235, 0.12);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.05);
}

.editor-section-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.15rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}

.editor-section-header i {
    color: var(--primary);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, 0.07);
    border-radius: 8px;
    flex-shrink: 0;
    padding: 7px;
}

.editor-section-header h5 {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--secondary);
    letter-spacing: -0.005em;
}

/* Editor Fields */
.editor-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
}

.editor-field {
    margin-bottom: 0.9rem;
    position: relative;
}

.editor-field:last-child {
    margin-bottom: 0.25rem;
}

.editor-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.45rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.editor-input {
    width: 100%;
    padding: 0.6rem 0.9rem;
    border: 1.5px solid rgba(15, 23, 42, 0.08);
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: var(--text-primary);
    background: #f8fafc;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
}

.editor-input:hover {
    border-color: rgba(15, 23, 42, 0.15);
    background: #f1f5f9;
}

.editor-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08), 0 2px 6px rgba(37, 99, 235, 0.06);
    background: #ffffff;
}

.editor-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.editor-textarea {
    resize: vertical;
    min-height: 90px;
    line-height: 1.6;
}

.editor-char-count {
    display: block;
    text-align: right;
    font-size: 0.68rem;
    color: var(--text-secondary);
    margin-top: 0.35rem;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

/* Color Picker */
.color-picker-row {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    padding: 0.25rem 0;
}

.color-swatch {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2.5px solid transparent;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
    position: relative;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.color-swatch:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.color-swatch.active {
    border-color: #fff;
    box-shadow: 0 0 0 2.5px var(--secondary), 0 2px 8px rgba(0, 0, 0, 0.12);
    transform: scale(1.1);
}

/* Resize Handle */
.editor-resize-handle {
    width: 7px;
    background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
    border-left: 1px solid rgba(15, 23, 42, 0.06);
    border-right: 1px solid rgba(15, 23, 42, 0.06);
    cursor: col-resize;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.25s;
}

.editor-resize-handle:hover {
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.06) 0%, rgba(37, 99, 235, 0.1) 100%);
}

.resize-grip {
    width: 3px;
    height: 36px;
    border-radius: 3px;
    background: rgba(0,0,0,0.1);
    transition: all 0.25s;
}

.editor-resize-handle:hover .resize-grip {
    background: var(--primary);
    height: 44px;
    box-shadow: 0 0 8px rgba(37, 99, 235, 0.3);
}

/* Preview Panel */
.editor-preview-panel {
    flex: 1;
    background: linear-gradient(135deg, #e8ecf1 0%, #dfe4eb 50%, #e2e7ee 100%);
    overflow: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 1.75rem;
}

.preview-frame-wrapper {
    width: 100%;
    max-width: 100%;
    transition: max-width 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s, transform 0.4s;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 30px -6px rgba(0, 0, 0, 0.1), 0 20px 50px -12px rgba(0, 0, 0, 0.12);
    background: #fff;
    height: fit-content;
    border: 1px solid rgba(255, 255, 255, 0.7);
}

.preview-frame-wrapper.device-desktop {
    max-width: 100%;
}

.preview-frame-wrapper.device-tablet {
    max-width: 768px;
}

.preview-frame-wrapper.device-mobile {
    max-width: 375px;
}

.preview-mobile-menu-icon {
    display: none;
    align-items: center;
    justify-content: center;
    color: #64748b;
    cursor: pointer;
}

/* ==========================================
   24a. Tablet Device Preview Overrides
   ========================================== */

/* -- Tablet Nav -- */
.device-tablet .preview-nav {
    padding: 0.65rem 1.25rem;
}

.device-tablet .preview-nav-links {
    gap: 1rem;
}

.device-tablet .preview-nav-link {
    font-size: 0.7rem;
}

/* -- Tablet Hero -- */
.device-tablet .preview-hero {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    padding: 2.5rem 1.75rem 2rem;
}

.device-tablet .preview-hero-content h1 {
    font-size: 1.4rem;
}

.device-tablet .preview-tagline {
    font-size: 0.75rem;
}

.device-tablet .preview-hero-img-wrap img {
    height: 160px;
}

/* -- Tablet About -- */
.device-tablet .preview-about {
    padding: 2rem 1.75rem;
}

.device-tablet .preview-about-content {
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

.device-tablet .preview-section-title {
    font-size: 1.15rem;
}

.device-tablet .preview-about-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
}

.device-tablet .preview-stat-card h3 {
    font-size: 0.95rem;
}

/* -- Tablet Projects -- */
.device-tablet .preview-projects {
    padding: 2rem 1.75rem;
}

.device-tablet .preview-project-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
}

.device-tablet .preview-project-img {
    height: 85px;
}

.device-tablet .preview-project-info h4 {
    font-size: 0.75rem;
}

.device-tablet .preview-project-info p {
    font-size: 0.65rem;
}

/* -- Tablet Contact -- */
.device-tablet .preview-contact {
    padding: 2rem 1.75rem;
}

.device-tablet .preview-contact-grid {
    grid-template-columns: 1fr 1.2fr;
    gap: 1.25rem;
}

/* -- Tablet Footer -- */
.device-tablet .preview-footer {
    padding: 1rem 1.5rem;
}

.device-tablet .preview-footer-inner {
    flex-direction: row;
    gap: 0.5rem;
}

/* ==========================================
   24b. Mobile Device Preview Overrides
   ========================================== */

/* -- Mobile Nav -- */
.device-mobile .preview-nav {
    padding: 0.6rem 1rem;
    position: relative;
}

.device-mobile .preview-nav-links {
    display: none;
}

.device-mobile .preview-nav-links.show-mobile-menu {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    padding: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 50;
    animation: slideDown 0.3s ease forwards;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.device-mobile .preview-mobile-menu-icon {
    display: flex;
}

.device-mobile .preview-logo {
    font-size: 0.82rem;
}

/* -- Mobile Hero -- */
.device-mobile .preview-hero {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding: 2rem 1.25rem 1.75rem;
    text-align: center;
}

.device-mobile .preview-hero-content h1 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.device-mobile .preview-tagline {
    font-size: 0.72rem;
    margin-bottom: 1rem;
}

.device-mobile .preview-badge {
    font-size: 0.62rem;
    padding: 0.25rem 0.65rem;
    margin-bottom: 0.75rem;
}

.device-mobile .preview-hero-btns {
    justify-content: center;
    gap: 0.5rem;
}

.device-mobile .preview-btn-primary,
.device-mobile .preview-btn-outline {
    padding: 0.4rem 0.9rem;
    font-size: 0.68rem;
}

.device-mobile .preview-hero-visual {
    order: -1;
}

.device-mobile .preview-hero-img-wrap img {
    height: 150px;
}

/* -- Mobile About -- */
.device-mobile .preview-about {
    padding: 1.75rem 1.25rem;
}

.device-mobile .preview-section-label {
    font-size: 0.62rem;
}

.device-mobile .preview-section-title {
    font-size: 1.05rem;
    margin-bottom: 1rem;
}

.device-mobile .preview-about-content {
    grid-template-columns: 1fr;
    gap: 1rem;
}

.device-mobile .preview-about-text p {
    font-size: 0.72rem;
}

.device-mobile .preview-about-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.device-mobile .preview-stat-card {
    padding: 0.65rem 0.35rem;
    border-radius: 10px;
}

.device-mobile .preview-stat-card h3 {
    font-size: 0.85rem;
}

.device-mobile .preview-stat-card p {
    font-size: 0.58rem;
}

/* -- Mobile Projects -- */
.device-mobile .preview-projects {
    padding: 1.75rem 1.25rem;
}

.device-mobile .preview-project-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.device-mobile .preview-project-card {
    display: grid;
    grid-template-columns: 100px 1fr;
    border-radius: 10px;
}

.device-mobile .preview-project-img {
    height: 100%;
    min-height: 80px;
}

.device-mobile .preview-project-img img {
    height: 100%;
}

.device-mobile .preview-project-info {
    padding: 0.65rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.device-mobile .preview-project-info h4 {
    font-size: 0.72rem;
}

.device-mobile .preview-project-info p {
    font-size: 0.62rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.device-mobile .preview-project-tag {
    font-size: 0.55rem;
}

/* -- Mobile Contact -- */
.device-mobile .preview-contact {
    padding: 1.75rem 1.25rem;
}

.device-mobile .preview-contact-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

.device-mobile .preview-contact-icon {
    width: 32px;
    height: 32px;
}

.device-mobile .preview-contact-item h5 {
    font-size: 0.72rem;
}

.device-mobile .preview-contact-item p {
    font-size: 0.65rem;
}

.device-mobile .preview-form-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

.device-mobile .preview-form-label {
    font-size: 0.62rem;
}

.device-mobile .preview-form-input {
    height: 28px;
}

.device-mobile .preview-btn-primary[style] {
    font-size: 0.68rem;
    padding: 0.4rem;
}

.device-mobile .preview-social-link {
    width: 32px;
    height: 32px;
}

/* -- Mobile Footer -- */
.device-mobile .preview-footer {
    padding: 1rem 1.25rem;
}

.device-mobile .preview-footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
}

.device-mobile .preview-footer-logo {
    justify-content: center;
    font-size: 0.75rem;
}

.device-mobile .preview-footer p {
    font-size: 0.6rem;
}

/* ==========================================
   24. Live Portfolio Preview Styles
   ========================================== */
.preview-portfolio {
    font-family: 'Inter', sans-serif;
    background: var(--preview-bg, #fff);
    color: #0f172a;
    font-size: 13px;
    line-height: 1.6;
}

/* Preview Nav */
.preview-nav {
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.preview-nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preview-logo {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 800;
    font-size: 0.9rem;
    color: #0f172a;
}

.preview-nav-links {
    display: flex;
    gap: 1.25rem;
}

.preview-nav-link {
    font-size: 0.75rem;
    font-weight: 500;
    color: #64748b;
    cursor: default;
}

.preview-nav-link.active {
    color: var(--preview-accent);
}

/* Preview Hero */
.preview-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 3rem 2rem 2.5rem;
    align-items: center;
}

.preview-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.75rem;
    background: #f0f9ff;
    border: 1px solid #e0f2fe;
    border-radius: 50px;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--preview-accent);
    margin-bottom: 1rem;
}

.preview-hero-content h1 {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 0.75rem;
    color: #0f172a;
    letter-spacing: -0.03em;
}

.preview-tagline {
    font-size: 0.82rem;
    color: #64748b;
    margin-bottom: 1.25rem;
    line-height: 1.6;
}

.preview-hero-btns {
    display: flex;
    gap: 0.6rem;
}

.preview-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.1rem;
    background: var(--preview-accent);
    color: white;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: default;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.preview-btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.1rem;
    background: transparent;
    color: #0f172a;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: default;
}

.preview-hero-visual {
    display: flex;
    justify-content: center;
}

.preview-hero-img-wrap {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.05);
}

.preview-hero-img-wrap img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

/* Preview About */
.preview-about {
    padding: 2.5rem 2rem;
    background: #f8fafc;
}

.preview-section-label {
    color: var(--preview-accent);
    text-transform: uppercase;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 0.35rem;
}

.preview-section-title {
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 1.25rem;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.preview-about-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

.preview-about-text p {
    font-size: 0.8rem;
    color: #475569;
    line-height: 1.7;
    margin: 0;
}

.preview-about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.preview-stat-card {
    text-align: center;
    padding: 0.85rem 0.5rem;
    background: white;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.preview-stat-card h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--preview-accent);
    margin-bottom: 0.15rem;
}

.preview-stat-card p {
    font-size: 0.65rem;
    color: #64748b;
    margin: 0;
}

/* Preview Projects */
.preview-projects {
    padding: 2.5rem 2rem;
}

.preview-project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.preview-project-card {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.06);
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: transform 0.3s;
}

.preview-project-card:hover {
    transform: translateY(-3px);
}

.preview-project-img {
    height: 100px;
    overflow: hidden;
}

.preview-project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.preview-project-info {
    padding: 0.75rem;
}

.preview-project-tag {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--preview-accent);
    letter-spacing: 0.05em;
}

.preview-project-info h4 {
    font-size: 0.82rem;
    font-weight: 700;
    margin: 0.25rem 0 0.2rem;
    color: #0f172a;
}

.preview-project-info p {
    font-size: 0.7rem;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

/* Preview Contact */
.preview-contact {
    padding: 2.5rem 2rem;
    background: #f8fafc;
}

.preview-contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 1.5rem;
}

.preview-contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.preview-contact-item {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
}

.preview-contact-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, 0.08);
    border-radius: 8px;
    color: var(--preview-accent);
    flex-shrink: 0;
}

.preview-contact-item h5 {
    font-size: 0.78rem;
    margin: 0 0 0.1rem;
    font-weight: 700;
    color: #0f172a;
}

.preview-contact-item p {
    font-size: 0.72rem;
    margin: 0;
    color: #64748b;
}

.preview-social-links {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.preview-social-link {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 8px;
    color: #64748b;
    transition: all 0.25s;
}

.preview-social-link:hover {
    background: var(--preview-accent);
    color: white;
    border-color: var(--preview-accent);
}

.preview-contact-form {
    background: white;
    padding: 1.25rem;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.preview-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
}

.preview-form-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.preview-form-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: #475569;
}

.preview-form-input {
    height: 32px;
    background: #f1f5f9;
    border-radius: 6px;
    border: 1px solid rgba(0,0,0,0.05);
}

/* Preview Footer */
.preview-footer {
    padding: 1.25rem 2rem;
    background: #0f172a;
    color: rgba(255,255,255,0.7);
}

.preview-footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preview-footer-logo {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 800;
    font-size: 0.82rem;
    color: #fff;
}

.preview-footer p {
    font-size: 0.68rem;
    margin: 0;
    color: rgba(255,255,255,0.5);
}

/* ==========================================
   25. Editor Responsive
   ========================================== */
@media (max-width: 1200px) {
    .editor-form-panel {
        width: 360px;
    }
}

@media (max-width: 900px) {
    .editor-split {
        flex-direction: column;
    }
    .editor-form-panel {
        width: 100% !important;
        max-height: 45vh;
        border-right: none;
        border-bottom: 1px solid var(--border-light);
    }
    .editor-resize-handle {
        display: none;
    }
    .editor-preview-panel {
        padding: 1rem;
    }
    .editor-device-toggle {
        display: none;
    }
    .preview-hero {
        grid-template-columns: 1fr;
        padding: 2rem 1.5rem;
    }
    .preview-hero-visual {
        display: none;
    }
    .preview-about-content {
        grid-template-columns: 1fr;
    }
    .preview-project-grid {
        grid-template-columns: 1fr;
    }
    .preview-contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .editor-topbar {
        flex-wrap: wrap;
        padding: 0.5rem 0.75rem;
    }
    .editor-topbar-right {
        width: 100%;
        justify-content: flex-end;
    }
    .editor-field-row {
        grid-template-columns: 1fr;
    }
    .editor-form-inner {
        padding: 1rem;
    }
}

/* Responsive Dashboard */
@media (max-width: 1024px) {
    .dashboard-sidebar {
        width: 64px;
        padding: 1.25rem 0.5rem;
    }
    .sidebar-user { justify-content: center; }
    .sidebar-user div { display: none; }
    .sidebar-link span { display: none; }
    .sidebar-link { justify-content: center; padding: 0.5rem; }
    .dashboard-main { margin-left: 64px; padding: 1.5rem; }
}

@media (max-width: 768px) {
    .dashboard-wrapper { flex-direction: column; }
    .dashboard-sidebar {
        width: 100%;
        position: static;
        height: auto;
        flex-direction: column;
        padding: 1.5rem 1rem;
        border-right: none;
        border-bottom: 1px solid var(--border-light);
    }
    .sidebar-user { display: none; }
    .sidebar-menu {
        display: flex;
        gap: 0.5rem;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 0.5rem;
    }
    .sidebar-menu li { margin-bottom: 0; }
    .sidebar-link span { display: inline; }
    .sidebar-link { justify-content: flex-start; padding: 0.5rem 1rem; }
    
    .dashboard-main {
        margin-left: 0;
        padding: 2rem 1rem;
    }
    .template-grid { grid-template-columns: 1fr; }
}
