* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-gradient: linear-gradient(135deg, #596c76 0%, #1f2732 100%);
    --secondary-gradient: linear-gradient(135deg, #596c76 0%, #3a4a54 100%);
    --accent-gradient: linear-gradient(135deg, #596c76 0%, #1f2732 100%);
    --dark-bg: #1f2732;
    --accent-color: #596c76;
    --card-bg: rgba(89, 108, 118, 0.08);
    --card-border: rgba(89, 108, 118, 0.2);
    --text-primary: #ffffff;
    --text-secondary: #b8c5ce;
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 30px 80px rgba(0, 0, 0, 0.4);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #ffffff;
    color: #1f2732;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 30%, rgba(89, 108, 118, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(89, 108, 118, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 20px 30px;
}

/* Logo Section */
.logo-section {
    text-align: center;
    padding: 20px 20px 15px;
    animation: fadeInDown 0.6s ease-out;
}

.logo-container {
    display: inline-block;
    background: linear-gradient(135deg, #1f2732 0%, #596c76 100%);
    padding: 30px 50px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(31, 39, 50, 0.15);
    transition: all 0.3s ease;
}

.logo-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(31, 39, 50, 0.25);
}

.logo {
    height: 120px;
    width: 100%;
    max-width: 200px;
    object-fit: contain;
    display: block;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 25px 20px 35px;
    margin-bottom: 30px;
    animation: fadeInDown 0.8s ease-out 0.2s both;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: #596c76;
    font-weight: 300;
    max-width: 600px;
    margin: 0 auto;
}

/* Gallery Grid */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    padding: 10px 0;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

/* Template Cards */
.template-card {
    display: block;
    text-decoration: none;
    background: linear-gradient(135deg, #1f2732 0%, #2a3540 100%);
    border: 1px solid rgba(89, 108, 118, 0.3);
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(31, 39, 50, 0.2);
    position: relative;
    animation: fadeInScale 0.6s ease-out both;
    cursor: pointer;
}

.template-card:nth-child(1) {
    animation-delay: 0.1s;
}

.template-card:nth-child(2) {
    animation-delay: 0.2s;
}

.template-card:nth-child(3) {
    animation-delay: 0.3s;
}

.template-card:nth-child(4) {
    animation-delay: 0.4s;
}

.template-card:nth-child(5) {
    animation-delay: 0.5s;
}

.template-card:nth-child(6) {
    animation-delay: 0.6s;
}

.template-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #596c76 0%, #1f2732 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
    border-radius: 24px;
}

.template-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 50px rgba(31, 39, 50, 0.35);
    border-color: rgba(89, 108, 118, 0.5);
}

.template-card:hover::before {
    opacity: 0.1;
}

.template-card.touch-active {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(31, 39, 50, 0.3);
}

.template-card.touch-active .card-overlay {
    opacity: 1;
}

/* Card Image */
.card-image-wrapper {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(89, 108, 118, 0.15) 0%, rgba(31, 39, 50, 0.2) 100%);
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.template-card:hover .card-image {
    transform: scale(1.1);
}

/* Card Overlay */
.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 15, 35, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    backdrop-filter: blur(8px);
}

.template-card:hover .card-overlay {
    opacity: 1;
}

/* View Button */
.view-button {
    display: inline-block;
    padding: 16px 40px;
    background: var(--accent-gradient);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(89, 108, 118, 0.4);
    transform: translateY(10px);
    pointer-events: none;
}

.template-card:hover .view-button {
    transform: translateY(0);
}

.template-card:hover .view-button {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 40px rgba(89, 108, 118, 0.6);
}

/* Card Content */
.card-content {
    padding: 20px 25px;
}

.card-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: #ffffff;
    line-height: 1.3;
}

.card-description {
    color: #b8c5ce;
    font-size: 1rem;
    font-weight: 400;
}

/* Footer */
.footer {
    text-align: center;
    padding: 40px 20px 30px;
    margin-top: 50px;
    color: #596c76;
    font-size: 0.9rem;
    border-top: 1px solid var(--card-border);
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .gallery {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .gallery {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .hero {
        padding: 20px 20px 25px;
        margin-bottom: 25px;
    }

    .hero-title {
        margin-bottom: 10px;
    }

    .card-image-wrapper {
        height: 200px;
    }

    .container {
        padding: 15px;
    }

    .logo-section {
        padding: 15px 15px 10px;
    }

    .logo-container {
        padding: 20px 35px;
    }

    .logo {
        height: 90px;
        max-width: 150px;
    }

    .hero-title {
        line-height: 1.1;
    }

    .card-title {
        line-height: 1.2;
    }

    .footer {
        padding: 25px 15px 20px;
        margin-top: 30px;
    }

    /* Make overlay always visible on mobile for better UX */
    .card-overlay {
        opacity: 0;
    }

    .template-card:active .card-overlay {
        opacity: 1;
    }
}

@media (max-width: 480px) {
    .card-content {
        padding: 18px 20px;
    }

    .card-title {
        font-size: 1.6rem;
        margin-bottom: 5px;
        line-height: 1.15;
    }

    .card-description {
        font-size: 0.95rem;
    }

    .view-button {
        padding: 14px 32px;
        font-size: 0.9rem;
    }

    .gallery {
        gap: 20px;
    }

    .card-image-wrapper {
        height: 180px;
    }

    .logo {
        height: 70px;
        max-width: 120px;
    }

    .logo-container {
        padding: 18px 30px;
    }

    .footer {
        padding: 20px 15px 15px;
        margin-top: 25px;
    }
}