/*
Theme Name: HMS Security Solution
Author: Antigravity
Description: Custom security theme converted from HTML/PHP.
Version: 1.0
*/

/* --- 1. SETTINGS & COLORS --- */
:root {
    --hms-blue: #0E2245;
    --hms-grey: #8d93a1;
    --text-white: #ffffff;
    --text-dark: #333333;
    --bg-light: #f9f9f9;
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-light);
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- 2. HEADER --- */
header {
    background: #fff;
    padding: 1rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.logo {
    display: flex;
    align-items: center;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.95rem;
}

.btn-header {
    background-color: var(--hms-blue);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    color: var(--hms-blue);
    background: none;
    border: none;
    cursor: pointer;
}

/* Responsive Header Styles */
@media (max-width: 900px) {
    header {
        padding: 1rem 1.5rem;
        flex-wrap: wrap;
    }

    .mobile-menu-btn {
        display: block;
    }

    nav {
        width: 100%;
        display: none;
        /* Hidden by default on mobile */
        margin-top: 1rem;
        border-top: 1px solid #eee;
        padding-top: 1rem;
    }

    nav.active {
        display: block;
    }

    nav ul {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    nav a {
        display: block;
        padding: 0.5rem;
    }

    .btn-header {
        display: inline-block;
    }
}

/* Dropdown Styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    z-index: 100;
    border-radius: 4px;
    top: 100%;
    left: 0;
    padding: 10px 0;
}

.dropdown-content a {
    color: var(--text-dark);
    padding: 12px 20px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
    color: var(--hms-blue);
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Mobile Dropdown */
@media (max-width: 900px) {
    .dropdown {
        display: block;
        width: 100%;
    }

    .dropdown-content {
        position: relative;
        box-shadow: none;
        background-color: #f9f9f9;
        display: none;
        /* hidden by default */
    }

    .dropdown.active .dropdown-content {
        display: block;
    }

    /* Add pointer to indicate clickability on mobile */
    .dropdown>a {
        cursor: pointer;
    }
}

/* --- FOOTER & COMMON ELEMENTS --- */
/* --- 6. DARK SECTORS & CONTACT SECTION --- */
.dark-section {
    background-color: #1a1a1a;
    color: white;
    padding: 80px 10%;
    display: flex;
    flex-wrap: wrap;
    gap: 4rem;
}

.footer-info {
    width: 100%;
    border-top: 1px solid #333;
    margin-top: 3rem;
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    color: #888;
    font-size: 0.9rem;
}

/* --- HOME PAGE STYLES --- */

/* --- HERO REDESIGN --- */
.hero-container {
    /* Increase padding bottom to prevent overlap */
    padding-bottom: 120px;
    background: linear-gradient(135deg, var(--hms-blue) 0%, #162f5f 100%);
    overflow: hidden;
    /* Ensure animations don't scroll page */
    display: flex;
    position: relative;
}

.hero-left {
    /* Ensure content stays above background */
    width: 50%;
    padding: 4rem 5% 4rem 10%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: white;
    position: relative;
    z-index: 2;
    /* Animation for text container */
    animation: fadeInUp 1s ease-out forwards;
    opacity: 0;
    /* Start hidden */
}

.hero-left h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    text-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    margin-bottom: 25px;
}

.hero-left p {
    color: #bdc5d6;
    font-size: 1.15rem;
    opacity: 0.9;
    margin-bottom: 40px;
    max-width: 450px;
    line-height: 1.6;
}

/* Modern Button with Hover Glow */
.btn-hero {
    background: linear-gradient(90deg, #d4a017 0%, #e6b800 100%);
    color: var(--hms-blue);
    padding: 16px 36px;
    font-size: 1.1rem;
    border-radius: 50px;
    /* Pillow shape */
    box-shadow: 0 8px 20px rgba(212, 160, 23, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    display: inline-block;
    text-decoration: none;
    font-weight: 600;
    /* Button specific animation delay */
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.3s forwards;
}

.btn-hero:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 25px rgba(212, 160, 23, 0.5);
}

/* Image Animation */
.hero-img {
    width: 50%;
    height: auto;
    display: block;
    object-fit: cover;
    /* Slide in from right */
    animation: fadeSlideLeft 1s ease-out forwards;
    opacity: 0;
}

/* --- CARDS REDESIGN --- */
.cards-section {
    /* Keep negative margin for overlap look, but ensure spacing is safe */
    margin-top: -100px;
    position: relative;
    z-index: 10;
    padding-bottom: 80px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* Unified Grid for all cards (cleaner than rows) */
.cards-wrapper {
    display: grid;
    /* Changed to auto-fit and reduced min-width to 250px for better mobile fit */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    /* Glassmorphism effect */
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 35px 25px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(14, 34, 69, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    /* Fill mode forwards is handled by JS or CSS delay below */
    animation: fadeInUp 0.8s ease-out forwards;
}

.card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(14, 34, 69, 0.15);
    border-color: var(--hms-blue);
}

.card-icon {
    background: rgba(14, 34, 69, 0.05);
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-bottom: 20px;
    color: var(--hms-blue);
    font-size: 2rem;
    transition: 0.3s;
}

.card:hover .card-icon {
    background: var(--hms-blue);
    color: white;
    transform: rotateY(180deg);
}

.card h3 {
    color: var(--hms-blue);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.card p {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.5;
}

/* Staggered Animations for Cards */
.card:nth-child(1) {
    animation-delay: 0.4s;
}

.card:nth-child(2) {
    animation-delay: 0.5s;
}

.card:nth-child(3) {
    animation-delay: 0.6s;
}

.card:nth-child(4) {
    animation-delay: 0.7s;
}

.card:nth-child(5) {
    animation-delay: 0.8s;
}

.card:nth-child(6) {
    animation-delay: 0.9s;
}

.card:nth-child(7) {
    animation-delay: 1.0s;
}

/* About Section */
.about-section {
    display: flex;
    padding: 100px 10%;
    gap: 50px;
    align-items: center;
}

.about-text {
    flex: 1;
}

.about-text h2 {
    font-size: 2.5rem;
    color: var(--hms-blue);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.about-text p {
    color: #555;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.about-image {
    flex: 1;
    position: relative;
}

.about-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

/* --- KEYFRAMES --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeSlideLeft {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Mobile Adjustments for Home */
@media (max-width: 900px) {
    .hero-container {
        flex-direction: column;
        height: auto;
        padding-bottom: 60px;
    }

    .hero-left {
        width: 100%;
        padding: 4rem 10%;
    }

    .hero-left h1 {
        font-size: 2.5rem;
    }

    .hero-img {
        width: 100%;
        height: auto;
    }

    .cards-section {
        margin-top: -30px;
        padding-bottom: 50px;
    }

    .cards-wrapper {
        /* Force single column on mobile to ensure responsiveness */
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .card {
        padding: 25px 20px;
    }

    .about-section {
        flex-direction: column;
    }
}

/* --- FOOTER SECTIONS --- */
.sectors-col {
    flex: 1;
    min-width: 300px;
}

.sectors-col h2 {
    margin-bottom: 2rem;
    font-size: 2rem;
}

.sector-btn {
    display: block;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 1rem;
    margin-bottom: 10px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    border-left: 4px solid transparent;
    transition: 0.3s;
}

.sector-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-left: 4px solid var(--hms-grey);
}

.contact-col {
    flex: 1;
    min-width: 300px;
}

.contact-col h2 {
    margin-bottom: 2rem;
    font-size: 2rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: #ccc;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 4px;
    background: #fff;
    font-family: inherit;
}

.btn-submit {
    background-color: var(--hms-blue);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 10px;
    width: 100%;
}

.btn-submit:hover {
    background-color: #1a3a6e;
}

/* --- CONTACT PAGE STYLES --- */
.page-banner {
    background-color: var(--hms-blue);
    color: white;
    padding: 80px 20px;
    text-align: center;
}

.page-banner h1 {
    font-size: 3rem;
    margin-bottom: 10px;
}

.page-banner p {
    color: #bdc5d6;
    max-width: 600px;
    margin: 0 auto;
}

.contact-container {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
    display: flex;
    gap: 50px;
    flex-wrap: wrap;
}

.contact-info {
    flex: 1;
    min-width: 300px;
}

.contact-info h2 {
    color: var(--hms-blue);
    margin-bottom: 20px;
}

.info-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.info-item i {
    color: var(--hms-blue);
    font-size: 1.2rem;
    margin-top: 5px;
}

.contact-form-wrapper {
    flex: 1.5;
    min-width: 300px;
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@media (max-width: 768px) {
    .contact-container {
        flex-direction: column;
    }
}