/* Zookay Premium Design System */

:root {
    --primary-color: #F7941D; /* Zookay Orange */
    --primary-light: #FFB35C;
    --primary-dark: #D47700;
    --secondary-color: #1A1A1A; /* Dark Charcoal */
    --accent-color: #FFD43B;
    --bg-color: #F8F9FA;
    --card-bg: rgba(255, 255, 255, 0.95);
    --text-main: #1A1A1A; /* Darker for contrast */
    --text-muted: #555555;
    --white: #FFFFFF;
    --glass-blur: 15px;
    --font-base: 1.125rem;
    --font-lg: 1.5rem;
    --font-xl: 3rem;
    --font-xxl: 4.5rem;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.8; /* Increased line height for better flow */
    font-size: var(--font-base);
    overflow-x: hidden;
}

h1, h2, h3 {
    letter-spacing: -0.02em;
    font-weight: 700;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(247, 148, 29, 0.7); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(247, 148, 29, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(247, 148, 29, 0); }
}

.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

/* Landing Page Components */
header {
    background: transparent;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: background 0.3s ease;
}

header.scrolled {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(var(--glass-blur));
    box-shadow: var(--shadow-sm);
}

.logo {
    perspective: 1000px;
}

.logo img {
    height: 60px;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.1));
}

.footer-logo img {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    padding: 8px 15px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    height: 45px !important;
}

.footer-logo img:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.logo:hover img {
    transform: rotateY(15deg) rotateX(5deg) scale(1.1);
    filter: drop-shadow(0 15px 30px rgba(247, 148, 29, 0.3));
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
}

nav a {
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: 700;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    padding: 8px 18px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

nav a i {
    font-size: 1.1rem;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

nav a:hover {
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

nav a:hover i {
    transform: translateY(-3px) scale(1.2);
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.3s, box-shadow 0.3s;
    display: inline-block;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    background: var(--primary-dark);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    background: linear-gradient(135deg, rgba(247, 148, 29, 0.1), rgba(0, 0, 0, 0.05)), url('../img/hero-bg.jpg');
    background-size: cover;
    background-position: center top; /* Center-top to keep 3D character faces in view */
    display: flex;
    align-items: center;
    padding: 120px 10%;
}

.hero-content {
    max-width: 700px;
    background: transparent; /* Box removed as requested */
    backdrop-filter: none;
    padding: 2rem 0;
    border: none;
    box-shadow: none;
    position: relative;
}

.hero subtitle {
    color: var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero h1 {
    font-size: var(--font-xxl);
    color: var(--white);
    line-height: 1.1;
    margin-bottom: 2rem;
    /* Soft black outline for definition + depth shadow */
    text-shadow: 
        -1px -1px 0 rgba(0,0,0,0.3),  
         1px -1px 0 rgba(0,0,0,0.3),
        -1px  1px 0 rgba(0,0,0,0.3),
         1px  1px 0 rgba(0,0,0,0.3),
         3px 3px 15px rgba(0,0,0,0.7);
    position: relative;
}

.hero p {
    font-size: 1.4rem; 
    font-weight: 600;
    color: var(--white);
    text-shadow: 
        -1px -1px 0 rgba(0,0,0,0.2),  
         1px -1px 0 rgba(0,0,0,0.2),
        -1px  1px 0 rgba(0,0,0,0.2),
         1px  1px 0 rgba(0,0,0,0.2),
         2px 2px 8px rgba(0,0,0,0.8);
    line-height: 1.6;
    max-width: 550px;
}

/* Cat Paw Trail Effect */
.paw-trail {
    position: absolute;
    top: -40px;
    left: 0;
    display: flex;
    gap: 15px;
    opacity: 0.6;
    pointer-events: none;
}

.paw-trail i, .menu-paw-trail i {
    color: var(--primary-color);
    font-size: 1.5rem;
    animation: pawWalk 4s infinite;
    transform: rotate(90deg); /* Pointing horizontally */
    filter: drop-shadow(1px 1px 0 #000) drop-shadow(-1px -1px 0 #000);
}

@keyframes pawWalk {
    0%, 100% { opacity: 0; transform: translateY(0) rotate(85deg) scale(0.8); }
    10%, 30% { opacity: 1; transform: translateY(-5px) rotate(95deg) scale(1); }
    40%, 90% { opacity: 0; }
}

.paw-trail i:nth-child(2) { animation-delay: 0.4s; }
.paw-trail i:nth-child(3) { animation-delay: 0.8s; }
.paw-trail i:nth-child(4) { animation-delay: 1.2s; }
.paw-trail i:nth-child(5) { animation-delay: 1.6s; }
.paw-trail i:nth-child(6) { animation-delay: 2.0s; }

/* Full-Page Climbing Cat Trail */
.climbing-cat-trail {
    position: fixed;
    right: 5%;
    bottom: 0;
    top: 0;
    width: 60px;
    pointer-events: none;
    z-index: 998;
    display: flex;
    flex-direction: column-reverse; /* Start from bottom */
    justify-content: space-around;
    padding-bottom: 50px;
}

.climbing-cat-trail i {
    color: var(--primary-color);
    font-size: 1.8rem;
    opacity: 0;
    transform: rotate(0deg) scale(0.6); /* Pointing Upwards */
    animation: catStep 8s infinite;
    filter: drop-shadow(1px 1px 0 #000) drop-shadow(-1px -1px 0 #000);
}

@keyframes catStep {
    0%, 100% { opacity: 0; transform: translateY(20px) rotate(-5deg) scale(0.5); }
    5%, 15% { opacity: 0.6; transform: translateY(0) rotate(5deg) scale(1); }
    20%, 95% { opacity: 0; }
}

/* Staggered timing + realistic gait rotation */
.climbing-cat-trail i:nth-child(1)  { animation-delay: 0.0s; margin-left: -15px; transform: rotate(-10deg); }
.climbing-cat-trail i:nth-child(2)  { animation-delay: 0.4s; margin-left: 15px; transform: rotate(10deg); }
.climbing-cat-trail i:nth-child(3)  { animation-delay: 0.8s; margin-left: -15px; transform: rotate(-10deg); }
.climbing-cat-trail i:nth-child(4)  { animation-delay: 1.2s; margin-left: 15px; transform: rotate(10deg); }
.climbing-cat-trail i:nth-child(5)  { animation-delay: 1.6s; margin-left: -15px; transform: rotate(-10deg); }
.climbing-cat-trail i:nth-child(6)  { animation-delay: 2.0s; margin-left: 15px; transform: rotate(10deg); }
.climbing-cat-trail i:nth-child(7)  { animation-delay: 2.4s; margin-left: -15px; transform: rotate(-10deg); }
.climbing-cat-trail i:nth-child(8)  { animation-delay: 2.8s; margin-left: 15px; transform: rotate(10deg); }
.climbing-cat-trail i:nth-child(9)  { animation-delay: 3.2s; margin-left: -15px; transform: rotate(-10deg); }
.climbing-cat-trail i:nth-child(10) { animation-delay: 3.6s; margin-left: 15px; transform: rotate(10deg); }
.climbing-cat-trail i:nth-child(11) { animation-delay: 4.0s; margin-left: -15px; transform: rotate(-10deg); }
.climbing-cat-trail i:nth-child(12) { animation-delay: 4.4s; margin-left: 15px; transform: rotate(10deg); }

/* Services */
.services {
    padding: 100px 10%;
    text-align: center;
}

.section-title {
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--secondary-color);
}

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

.service-card {
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
    
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    border: 4px solid var(--primary-color);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.4); /* Overlay for text readability */
    z-index: 1;
    transition: background 0.3s ease;
}

.service-card:hover::before {
    background: rgba(0, 0, 0, 0.6);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(247, 148, 29, 0.4);
}

.service-card .card-content {
    position: relative;
    z-index: 2;
    padding: 3rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    min-height: 250px;
}

.service-card h3 {
    margin-bottom: 1.5rem;
    color: var(--white);
    background: rgba(247, 148, 29, 0.95);
    padding: 10px 15px;
    border-radius: 8px;
    display: inline-block;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    border: 2px solid rgba(255,255,255,0.2);
}

.service-card p {
    color: #fff;
    font-weight: 500;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.9);
    background: rgba(31, 60, 136, 0.85);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.service-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: block;
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background: #25d366;
    color: white;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 35px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    text-decoration: none;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

.whatsapp-text {
    position: absolute;
    right: 75px;
    background: white;
    color: var(--secondary-color);
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: var(--shadow-md);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.whatsapp-float:hover .whatsapp-text {
    opacity: 1;
}

/* Dynamic Footer */
.dynamic-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--secondary-color);
    color: white;
    padding: 1.5rem 0;
    text-align: center;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 999;
}

.dynamic-footer.visible {
    transform: translateY(0);
}

.footer-content {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-credits {
    font-size: 0.9rem;
    opacity: 0.8;
}

.footer-credits strong {
    color: var(--primary-color);
}

/* Portal Specific Styles */
.portal-container {
    padding-top: 100px;
    min-height: 100vh;
}

.form-card {
    background: var(--white);
    padding: 3rem;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    margin: 20px auto;
    max-width: 1000px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.6rem;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input, .form-group select, .form-group textarea {
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.3s;
}

.form-group input:focus {
    border-color: var(--primary-color);
}

.table-container {
    overflow-x: auto;
    margin: 20px 0;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    text-align: left;
}

th {
    background: #f4f4f4;
    font-weight: 700;
}

/* Fix for dynamic footer overlapping buttons in the portal */
.portal-container {
    padding-bottom: 200px;
}

/* Ensure portal header is always solid and compact */
body.portal-body header {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    box-shadow: var(--shadow-sm) !important;
    padding: 0.5rem 5% !important; /* Reduced height for workspace */
}

body.portal-body .logo img {
    height: 40px !important; /* Smaller logo in portal */
}

body.portal-body .portal-container {
    margin-top: 48px !important; /* Content will now snuggly tuck just behind/above the thinner header */
}

/* ELIMINATE extra top margin from cards in the portal to stay tight to header */
body.portal-body .form-card {
    margin-top: -5px !important;
}

/* --- Responsive Adjustments --- */
@media screen and (max-width: 768px) {
    :root {
        --font-xl: 2rem;
        --font-xxl: 2.8rem;
    }

    header {
        padding: 1rem 3%;
        flex-direction: column;
        gap: 1rem;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
    }

    nav ul {
        gap: 0.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    nav a {
        padding: 6px 12px;
        font-size: 0.9rem;
    }

    .hero {
        padding: 140px 5% 60px;
        text-align: center;
        justify-content: center;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero h1 {
        font-size: var(--font-xxl);
    }

    .hero p {
        font-size: 1.1rem;
        margin: 0 auto 2rem;
    }

    .hero .btn-primary {
        margin: 0.5rem !important;
        display: block;
        width: 100%;
    }

    .services {
        padding: 60px 5%;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
        font-size: 30px;
    }

    .whatsapp-text {
        display: none; /* Hide floating text on mobile to save space */
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        padding-bottom: 2rem;
    }

    .form-card {
        padding: 1.5rem;
    }

    .climbing-cat-trail {
        display: none; /* Hide trail on mobile to prevent clutter */
    }
}

@media screen and (max-width: 480px) {
    :root {
        --font-xxl: 2.2rem;
    }

    .hero h1 {
        font-size: var(--font-xxl);
    }

    nav a {
        font-size: 0.8rem;
        padding: 5px 8px;
    }
}
