/* --- CSS Variables & Theming --- */
:root {
    /* Base variables, overridden by theme classes */
    --bg-primary: #1a1a1a;
    --bg-secondary: #2a2a2a;
    --text-primary: #f0f0f0;
    --text-secondary: #b0b0b0;
    --accent-primary: #e0c56e; /* Gold */
    --accent-secondary: #ffffff;
    --shadow-color: rgba(0, 0, 0, 0.2);
    --font-family: 'Poppins', sans-serif;
}

/* Dark Themes */
.theme-gold-dark { --accent-primary: #e0c56e; }
.theme-nebula-dark { --bg-primary: #1a1822; --bg-secondary: #2c283b; --accent-primary: #be93d4; }
.theme-starlight-dark { --bg-primary: #182022; --bg-secondary: #28373b; --accent-primary: #63d2d4; }
.theme-nova-dark { --bg-primary: #221c18; --bg-secondary: #3b3028; --accent-primary: #f5a66f; }

/* Light Themes */
.theme-daylight-light {
    --bg-primary: #f0f8ff;
    --bg-secondary: #ffffff;
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --accent-primary: #3b82f6;
    --shadow-color: rgba(0, 0, 0, 0.05);
}
.theme-cosmic-light {
    --bg-primary: #f5f5dc;
    --bg-secondary: #ffffff;
    --text-primary: #3d3b31;
    --text-secondary: #5a5649;
    --accent-primary: #8b4513;
    --shadow-color: rgba(0, 0, 0, 0.05);
}


/* --- General Styles --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.5s ease, color 0.5s ease;
    line-height: 1.6;
    overflow: hidden; /* Hide main body scrollbar */
}

/* --- Scroll Container --- */
.scroll-container {
    height: 100vh;
    overflow-y: scroll;
    /* Hide scrollbar */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
}
.scroll-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}


.scroll-section {
    height: 100vh;
    width: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 0 5%;
}

.section-content {
    /* Transitions are now handled by JS for a smoother effect */
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}


/* --- Header & Navigation --- */
.main-header {
    padding: 1rem 0;
    background-color: transparent;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.main-header > .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: transparent;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    transition: background-color 0.4s ease;
    max-width: 1100px;
    margin: 0 auto;
}

body.scrolled .main-header > .container {
    background-color: var(--bg-secondary);
}

.logo { 
    display: flex; 
    align-items: center; 
    gap: 0.75rem; 
    text-decoration: none;
    cursor: pointer;
}
.logo img { height: 40px; width: 40px; border-radius: 8px; }
.logo h1 { font-size: 1.5rem; font-weight: 700; color: var(--text-primary); }

.main-nav { flex-grow: 1; text-align: center; }
.main-nav a {
    font-weight: 400;
    font-size: 1rem;
    color: var(--text-primary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    margin: 0 0.5rem;
    transition: background-color 0.3s ease, color 0.3s ease;
    cursor: pointer;
}

.main-nav a:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.1);
}


/* --- Theme Customizer --- */
.theme-customizer { position: relative; }
.theme-button {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
}
.palette-icon {
    width: 24px;
    height: 24px;
    color: var(--text-primary);
    transition: transform 0.3s ease;
}
.theme-button:hover .palette-icon {
    transform: scale(1.1) rotate(15deg);
}

.current-color-preview {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--text-primary);
    transition: background-color 0.3s ease;
}

.theme-palette {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 0.75rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    box-shadow: 0 6px 20px var(--shadow-color);
    transform: translateY(-10px) scale(0.95);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s;
}

.theme-palette.active {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
}

.theme-swatch {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.2s ease, border-color 0.3s ease;
}
.theme-swatch:hover {
    transform: scale(1.1);
    border-color: var(--accent-secondary);
}

/* --- Hero Section & Particles --- */
.hero-fullscreen h2 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-fullscreen p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

#particle-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.particle {
    position: absolute;
    background-color: var(--accent-secondary);
    border-radius: 50%;
    opacity: 0;
    animation: rise 10s infinite linear;
    bottom: 0;
}

@keyframes rise {
    0% { transform: translateY(0); opacity: 0; }
    10%, 90% { opacity: 0.8; }
    100% { transform: translateY(-100vh); opacity: 0; }
}

.scroll-down-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 40px;
    border: 2px solid var(--accent-primary);
    border-radius: 20px;
}
.scroll-down-indicator::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background-color: var(--accent-primary);
    border-radius: 2px;
    animation: scroll-anim 2s infinite;
}
@keyframes scroll-anim {
    0% { transform: translate(-50%, 0); opacity: 1; }
    50% { transform: translate(-50%, 10px); opacity: 0.5; }
    100% { transform: translate(-50%, 0); opacity: 1; }
}

/* --- Content Cards --- */
.content-card {
    background-color: var(--bg-secondary);
    padding: 1.5rem; /* Adjusted padding */
    border-radius: 24px;
    box-shadow: 0 8px 30px var(--shadow-color);
    text-align: center;
    display: flex;
    flex-direction: column;
}

.content-card h4 {
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
    font-size: 1.1rem; /* Adjusted font size */
}

.content-card p {
    font-size: 0.9rem; /* Adjusted font size */
    flex-grow: 1; /* Allow p to take up space */
    margin-bottom: 1rem;
}


/* About Us & Contact Section Specifics */
#about .content-card,
#contact .content-card {
    background: transparent;
    box-shadow: none;
    max-width: 65ch;
    padding: 0;
}

#contact .content-card p {
    margin-bottom: 2rem;
}

/* --- Services Section Layout --- */
.services-section .section-title {
    font-size: clamp(2.5rem, 5vmin, 3.5rem);
    margin-bottom: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.content-grid {
    position: relative;
    width: 100%;
    max-width: 1200px;
    height: 100vh;
    margin: 0;
}

.services-section .content-card {
    position: absolute;
    width: clamp(250px, 25vmin, 300px);
    min-height: clamp(290px, 28vmin, 340px); /* Use min-height */
    height: auto; /* Allow height to adjust */
    transition: transform 0.4s ease-out;
}

.services-section .content-card:hover {
    transform: scale(1.05) !important;
    z-index: 10;
}

/* Planetary Positions */
.services-section .content-card:nth-child(1) {
    top: 15%;
    left: 12%;
    transform: rotate(-8deg);
}
.services-section .content-card:nth-child(2) {
    top: 20%;
    right: 10%;
    transform: rotate(5deg);
}
.services-section .content-card:nth-child(3) {
    bottom: 15%;
    left: 25%;
    transform: rotate(7deg);
}
.services-section .content-card:nth-child(4) {
    bottom: 10%;
    right: 18%;
    transform: rotate(-4deg);
}


/* --- Services Icons & Tooltips --- */
.service-card-icon {
    color: #ffffff;
    margin-bottom: 1rem;
}
.service-card-icon img, .service-card-icon svg {
    width: 36px;
    height: 36px;
    filter: drop-shadow(0 0 3px rgba(0,0,0,0.4));
}
.theme-daylight-light .service-card-icon svg,
.theme-cosmic-light .service-card-icon svg {
    filter: none;
}

.icon-bar {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: auto;
    padding-top: 1rem;
    color: #ffffff;
}
.icon-wrapper {
    position: relative;
    cursor: pointer;
}

.icon-wrapper svg, .icon-wrapper img {
    width: 28px;
    height: 28px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    filter: drop-shadow(0 0 3px rgba(0,0,0,0.4));
}

.icon-wrapper:hover svg, .icon-wrapper:hover img {
    transform: scale(1.2);
    opacity: 0.8;
}

/* Tooltip Styling */
.icon-wrapper[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 4px 10px var(--shadow-color);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, bottom 0.3s ease;
    z-index: 1000;
}
.icon-wrapper[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
    bottom: 140%;
}


/* --- Buttons --- */
.btn { 
    display: inline-block; 
    padding: 0.8rem 1.8rem; 
    border-radius: 50px; 
    font-weight: 600; 
    text-align: center; 
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease; 
    cursor: pointer;
    border: none;
    font-family: var(--font-family);
}
.btn:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 4px 15px var(--shadow-color); 
}
.btn-primary { background-color: var(--accent-primary); color: var(--bg-primary); }
.btn-primary:hover { color: var(--bg-primary); }
.btn-secondary { background-color: transparent; border: 2px solid var(--accent-primary); color: var(--accent-primary); }
.btn-secondary:hover { background-color: var(--accent-primary); color: var(--bg-primary); }


/* --- Contact Modal --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.modal-content {
    background-color: var(--bg-secondary);
    padding: 2.5rem;
    border-radius: 24px;
    width: 90%;
    max-width: 500px;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}
.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-content h3 {
    margin-bottom: 1.5rem;
    text-align: center;
}
.form-group {
    margin-bottom: 1rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    text-align: left;
}
.form-group label .required {
    color: var(--accent-primary);
    margin-left: 0.25rem;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--bg-primary);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 1rem;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--accent-primary);
}
.form-group textarea {
    resize: vertical;
    min-height: 80px;
    max-height: 200px;
}
.form-group select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23b0b0b0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1em;
    padding-right: 2.5rem;
}
.form-group select:required:invalid {
    color: var(--text-secondary);
}
.form-group option[value=""][disabled] {
    display: none;
}
.form-group option {
    color: var(--text-primary);
    background-color: var(--bg-secondary);
}
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.form-button-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
}
.btn-cancel {
    background: none;
    border: 2px solid var(--text-secondary);
    color: var(--text-secondary);
}
.btn-cancel:hover {
    color: var(--text-primary);
    border-color: var(--text-primary);
    background-color: transparent;
}

#form-status {
    text-align: center;
    margin-top: 1rem;
    min-height: 1.5em;
}

.modal-success-view {
    display: none; /* Hidden by default */
    text-align: center;
}
.modal-success-view h3 {
    color: var(--accent-primary);
}
.modal-success-view p {
    margin-bottom: 2rem;
}
.modal-content.show-success .modal-form-view {
    display: none;
}
.modal-content.show-success .modal-success-view {
    display: block;
}


/* --- Responsive Design --- */
@media (max-width: 1200px) {
    .services-section .content-card:nth-child(1) { left: 5%; }
    .services-section .content-card:nth-child(2) { right: 5%; }
    .services-section .content-card:nth-child(3) { left: 15%; }
    .services-section .content-card:nth-child(4) { right: 15%; }
}

/* Vertical Scaling Fallback */
@media (max-height: 750px), (max-width: 900px) {
    .services-section .section-title {
        position: static;
        transform: none;
        margin-bottom: 2rem;
    }
    .content-grid {
        position: static;
        display: grid;
        grid-template-columns: 1fr;
        height: auto;
        gap: 1.5rem;
        margin-top: 0;
    }
    .services-section .content-card {
        position: static;
        width: auto;
        height: auto;
        transform: none !important;
    }
}


@media (max-width: 768px) {
    .main-header > .container { padding: 0.5rem; }
    .main-nav { display: none; }
    .hero-fullscreen h2 { font-size: 2.5rem; }
    .theme-customizer { position: static; }
}
