/* DesignPro - Custom Styles */

:root {
    --primary: #3b82f6;
    --primary-dark: #1d4ed8;
    --secondary: #f59e0b;
    --secondary-dark: #d97706;
    --light: #f8f9fa;
    --dark: #1f2937;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --gray: #6b7280;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding-top: 80px;
    color: var(--dark);
    background: #fff;
}

/* Navigation */
.navbar {
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    padding: 15px 0;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--warning);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.nav-link {
    font-weight: 500;
    padding: 10px 20px !important;
    border-radius: 8px;
    margin: 0 5px;
    transition: all 0.3s;
}

.nav-link:hover, .nav-link.active {
    background: var(--warning);
    color: white !important;
}

/* Design Cards */
.design-card {
    border: 1px solid #e5e7eb;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s;
    background: white;
    display: flex;
    flex-direction: column;
}

.popular-designs .design-card {
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}
.popular-designs .design-card .card-body {
    padding: 14px 14px;
}
.popular-designs .category-badge {
    margin-bottom: 6px;
}
.popular-designs .card-title {
    font-size: 1rem;
}

.design-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
    border-color: var(--warning);
}

.design-img {
    width: 100%;
    height: clamp(140px, 35vw, 200px);
    object-fit: cover;
    transition: transform 0.5s;
}

.design-card:hover .design-img {
    transform: scale(1.05);
}

.design-card .card-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.design-card .card-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.25;
    margin-bottom: 4px;
}

.design-card .card-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
}

.price-tag {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--warning);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3);
}

.category-badge {
    display: inline-block;
    padding: 5px 12px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    font-size: 13px;
    color: var(--gray);
    text-decoration: none;
    transition: all 0.3s;
}

.category-badge:hover, .category-badge.active {
    background: var(--warning);
    color: white;
    border-color: var(--warning);
    text-decoration: none;
}

/* Sections */
.hero-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    position: relative;
    overflow: hidden;
}

.hero-section:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/pattern.svg');
    opacity: 0.1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--gray);
    margin-bottom: 30px;
    max-width: 600px;
}

.text-yellow {
    color: var(--warning) !important;
}

.btn-primary {
    background: var(--primary);
    border: none;
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.btn-outline-yellow {
    border: 2px solid var(--warning);
    color: var(--warning);
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s;
}

.btn-outline-yellow:hover {
    background: var(--warning);
    color: white;
    transform: translateY(-2px);
}

/* Process steps */
.process-step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--warning);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 20px;
    margin-right: 20px;
    flex-shrink: 0;
}

/* Filter section */
.filter-section {
    background: #fef3c7;
    border: 1px solid #fde68a;
}

.bg-light-yellow {
    background: #fef3c7 !important;
}

/* Services */
.service-icon {
    width: 60px;
    height: 60px;
    background: var(--warning);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

/* Footer */
.floating-whatsapp {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.floating-whatsapp .btn {
    width: 60px;
    height: 60px;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Modal */
.modal-content {
    border-radius: 15px;
    overflow: hidden;
    border: none;
}

.modal-header {
    padding: 20px 30px;
}

.modal-body {
    padding: 30px;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }
    .container {
        padding-left: 14px;
        padding-right: 14px;
    }
    /* Header dropdown in collapsed nav */
    .navbar .dropdown-menu.profile-menu {
        position: static !important;
        transform: none !important;
        width: 100%;
        margin-top: 0.35rem;
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }
    .navbar .dropdown-menu.profile-menu.show {
        display: block;
    }
    .hero-title {
        font-size: 2.3rem;
    }
    .hero-subtitle {
        font-size: 0.95rem;
    }
    .hero-section {
        padding: 60px 0 40px;
        text-align: center;
    }
    .hero-section .row {
        flex-direction: column-reverse;
    }
    .hero-section .btn {
        width: auto;
        min-width: 0;
        margin-bottom: 0;
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    .hero-section .d-flex.gap-3 {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px !important;
    }
    .hero-section .d-flex.gap-3 a.btn {
        flex: 1 1 calc(48% - 6px);
        text-align: center;
    }
    .process-steps {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 14px;
    }
    .process-step {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        background: #fde68a;
        border: 1px solid #f1f5f9;
        border-radius: 12px;
        padding: 14px;
        margin-bottom: 0;
        box-shadow: 0 6px 14px rgba(0,0,0,0.04);
    }
    .process-step h5 {
        font-size: 0.95rem;
    }
    .process-step p {
        font-size: 0.85rem;
        margin-bottom: 0;
    }
    .step-number {
        margin: 0 0 8px 0;
    }
    .floating-whatsapp {
        bottom: 20px;
        right: 20px;
    }
    /* Design cards */
    .design-img {
        height: clamp(120px, 38vw, 180px);
    }
    .design-card {
        border-radius: 12px;
    }
    .price-tag {
        top: 8px;
        right: 8px;
        padding: 5px 10px;
        font-size: 11px;
    }
    .mini-video-preview,
    .clickable-preview {
        height: 160px;
    }
    /* Services cards layout tweaks for medium screens */
    .services-section .col-md-4 {
        padding-left: 10px;
        padding-right: 10px;
    }
    .services-section .design-card .placeholder-design {
        height: 140px;
    }
    /* Popular designs spacing */
    .popular-designs .design-card .card-body {
        padding: 7px 5px;
    }
    .popular-designs .card-title {
        font-size: 1rem;
        margin-bottom: 4px;
    }
    .popular-designs .card-text {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-size: 0.92rem;
        margin-bottom: 0.35rem;
    }
    .design-card .card-body {
        gap: 5px;
    }
    .design-card .card-title {
        -webkit-line-clamp: 2;
    }
    .design-card .card-text {
        -webkit-line-clamp: 2;
    }
    /* Harmonize media heights */
    .design-card .card-img-top,
    .design-card .design-img,
    .design-card .poster-image,
    .design-card .poster-image img,
    .design-card .brochure-cover,
    .design-card .brochure-cover img {
        width: 100%;
        height: clamp(120px, 38vw, 180px) !important;
        object-fit: cover;
    }
}

@media (max-width: 576px) {
    body {
        padding-top: 56px;
    }
    .navbar {
        padding: 9px 0;
    }
    .nav-link {
        padding: 7px 12px !important;
        margin: 0 1px;
    }
    .hero-title {
        font-size: 1.9rem;
        line-height: 1.2;
    }
    .hero-subtitle {
        font-size: 0.9rem;
    }
    .design-img {
        height: clamp(110px, 45vw, 160px);
    }
    .mini-video-preview,
    .clickable-preview {
        height: 140px;
    }
    .price-tag {
        top: 8px;
        right: 8px;
        padding: 4px 9px;
        font-size: 10px;
    }
    /* Popular designs spacing */
    .popular-designs .design-card .card-body {
        padding: 5px 4px;
    }
    .popular-designs .card-title {
        font-size: 0.95rem;
        margin-bottom: 3px;
    }
    .popular-designs .card-text {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-size: 0.85rem;
        margin-bottom: 0.3rem;
    }
    .design-card .card-body {
        gap: 4px;
    }
    .design-card .card-title {
        -webkit-line-clamp: 2;
    }
    .design-card .card-text {
        -webkit-line-clamp: 2;
    }
    /* Harmonize media heights small phones */
    .design-card .card-img-top,
    .design-card .design-img,
    .design-card .poster-image,
    .design-card .poster-image img,
    .design-card .brochure-cover,
    .design-card .brochure-cover img {
        width: 100%;
        height: clamp(110px, 45vw, 160px) !important;
        object-fit: cover;
    }
    /* Services cards: 2 per row, more compact */
    .services-section .col-md-4 {
        flex: 0 0 50%;
        max-width: 50%;
        padding-left: 8px;
        padding-right: 8px;
    }
.services-section .design-card {
    border-radius: 12px;
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    }
    .services-section .design-card .placeholder-design {
        flex: 0 0 45%;
        height: auto;
        aspect-ratio: 1 / 1;
        border-radius: 12px 12px 0 0;
    }
    .services-section .card-body {
        padding: 8px 10px;
        flex: 1 1 55%;
        display: flex;
        flex-direction: column;
        gap: 4px;
        justify-content: space-between;
    }
    .services-section .card-title {
        font-size: 0.9rem;
        margin-bottom: 0;
    }
    .services-section .card-text {
        font-size: 0.8rem;
        margin-bottom: 0.4rem;
    }
    .services-section .btn {
        padding: 7px 9px;
        font-size: 0.8rem;
        margin-top: auto;
    }
    .services-section .service-icon {
        width: 42px;
        height: 42px;
        font-size: 18px;
    }
    .process-step {
        margin-bottom: 16px;
    }
    .service-icon {
        width: 48px;
        height: 48px;
        font-size: 18px;
    }
    .floating-whatsapp {
        bottom: 12px;
        right: 12px;
    }

    /* Cacher la section services sur mobile */
    .services-section {
        display: none;
    }
}

/* Animations */
.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading states */
.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading:after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--warning);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-dark);
}

/* --- HARD OVERRIDES FOR REMOTE DEPLOY (force heights & clamp text) --- */
.design-card {
    display: flex !important;
    flex-direction: column !important;
}
.design-card .card-body {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
}
.design-card .btn {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 5px 8px !important;
        line-height: 1.2 !important;
        margin-top: auto !important;
    }
    
.design-card .card-title {
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    line-height: 1.25 !important;
    margin-bottom: 4px !important;
}
.design-card .card-text {
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    margin-bottom: 6px !important;
}
/* Force consistent media height across all design cards */
.design-card .card-img-top,
.design-card .design-img,
.design-card .poster-image,
.design-card .poster-image img,
.design-card .brochure-cover,
.design-card .brochure-cover img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}
@media (max-width: 576px) {
    .design-card .card-img-top,
    .design-card .design-img,
    .design-card .poster-image,
    .design-card .poster-image img,
    .design-card .brochure-cover,
    .design-card .brochure-cover img {
        height: clamp(110px, 45vw, 160px) !important;
    }
    .design-card .card-body {
        gap: 4px !important;
    }
}
