/* 
 * Main Stylesheet for Home Security Website
 * Focused on responsiveness, security aesthetics, and fast loading
 */

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    margin-bottom: 20px;
    color: #222;
}

a {
    text-decoration: none;
    color: #e63946;
    transition: color 0.3s ease;
}

a:hover {
    color: #c1121f;
}

img {
    max-width: 100%;
    height: auto;
}

ul {
    list-style: none;
}

/* Top Bar */
.top-bar {
    background-color: #1d3557;
    color: #fff;
    padding: 10px 0;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-info span {
    margin-right: 20px;
}

.contact-info a {
    color: #fff;
}

.emergency {
    font-weight: bold;
    color: #ffb703;
}

.emergency i {
    color: #ffb703;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

.social-icons a {
    color: #fff;
    margin-left: 15px;
    font-size: 16px;
}

/* Header */
.site-header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 15px 0;
    position: relative;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 60px;
    margin-right: 10px;
}

.logo span {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 24px;
    color: #1d3557;
}

/* Navigation */
.main-nav ul {
    display: flex;
}

.main-nav li {
    margin-left: 25px;
}

.main-nav a {
    color: #333;
    font-weight: 600;
    padding: 10px 0;
    position: relative;
}

.main-nav a:hover {
    color: #e63946;
}

.main-nav a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #e63946;
    transition: width 0.3s ease;
}

.main-nav a:hover:after {
    width: 100%;
}

.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #1d3557;
}

/* Hero Section */
.hero {
    background-size: cover;
    background-position: center;
    color: #fff;
    text-align: center;
    padding: 100px 0;
    position: relative;
}

.hero:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    color: #fff;
}

.hero p {
    font-size: 20px;
    margin-bottom: 30px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: #e63946;
    color: #fff;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #c1121f;
    color: #fff;
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid #fff;
}

.btn-secondary:hover {
    background-color: #fff;
    color: #1d3557;
}

/* Sections */
.section {
    padding: 80px 0;
}

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

.section-title h2 {
    font-size: 36px;
    position: relative;
    padding-bottom: 15px;
}

.section-title h2:after {
    content: '';
    position: absolute;
    width: 80px;
    height: 3px;
    background-color: #e63946;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.section-title p {
    color: #666;
    font-size: 18px;
    max-width: 700px;
    margin: 0 auto;
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.service-image {
    height: 200px;
    overflow: hidden;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.service-card:hover .service-image img {
    transform: scale(1.05);
}

.service-content {
    padding: 25px;
}

.service-content h3 {
    font-size: 22px;
    margin-bottom: 15px;
}

.service-content p {
    color: #666;
    margin-bottom: 20px;
}

/* Features */
.features-section {
    background-color: #f1faee;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.feature-item {
    text-align: center;
    padding: 30px 20px;
}

.feature-icon {
    font-size: 48px;
    color: #e63946;
    margin-bottom: 20px;
}

.feature-item h3 {
    font-size: 20px;
    margin-bottom: 15px;
}

.feature-item p {
    color: #666;
}

/* About Section */
.about-section {
    background-color: #fff;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-image {
    flex: 1;
}

.about-image img {
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.about-text {
    flex: 1;
}

.about-text h2 {
    font-size: 36px;
    margin-bottom: 20px;
}

.about-text p {
    margin-bottom: 15px;
    color: #666;
}

/* Team Section */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.team-member {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
}

.team-image {
    height: 250px;
    overflow: hidden;
}

.team-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-info {
    padding: 20px;
}

.team-info h3 {
    font-size: 20px;
    margin-bottom: 5px;
}

.team-info p {
    color: #666;
    font-style: italic;
}

/* Testimonials */
.testimonials-section {
    background-color: #f1faee;
}

.testimonial-slider {
    max-width: 800px;
    margin: 0 auto;
}

.testimonial-item {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
}

.testimonial-content {
    font-style: italic;
    margin-bottom: 20px;
    color: #666;
}

.testimonial-author {
    font-weight: 600;
}

/* Contact Section */
.contact-section {
    background-color: #fff;
}

.contact-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 50px;
}

.contact-info h3 {
    font-size: 24px;
    margin-bottom: 20px;
}

.contact-info p {
    margin-bottom: 15px;
    color: #666;
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}

.contact-info-item i {
    font-size: 20px;
    color: #e63946;
    margin-right: 15px;
    margin-top: 5px;
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 16px;
}

.contact-form textarea {
    height: 150px;
    resize: vertical;
}

/* Footer */
.site-footer {
    background-color: #1d3557;
    color: #fff;
    padding: 60px 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.footer-section h3 {
    color: #fff;
    font-size: 20px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-section h3:after {
    content: '';
    position: absolute;
    width: 50px;
    height: 2px;
    background-color: #e63946;
    bottom: 0;
    left: 0;
}

.footer-section p {
    margin-bottom: 15px;
    color: #ddd;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #ddd;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #e63946;
}

.footer-bottom {
    background-color: #152238;
    padding: 20px 0;
    text-align: center;
}

.footer-bottom p {
    margin: 0;
    color: #ddd;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .about-content {
        flex-direction: column;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .mobile-nav-toggle {
        display: block;
    }
    
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #fff;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        z-index: 100;
    }
    
    .main-nav.active {
        display: block;
    }
    
    .main-nav ul {
        flex-direction: column;
        padding: 20px;
    }
    
    .main-nav li {
        margin: 0;
        margin-bottom: 15px;
    }
    
    .hero h1 {
        font-size: 36px;
    }
    
    .hero p {
        font-size: 18px;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .section-title h2 {
        font-size: 30px;
    }
}

@media (max-width: 576px) {
    .top-bar .container {
        flex-direction: column;
    }
    
    .social-icons {
        margin-top: 10px;
    }
    
    .hero {
        padding: 80px 0;
    }
    
    .hero h1 {
        font-size: 28px;
    }
    
    .hero p {
        font-size: 16px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}
