* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow-wrap: anywhere;
}

a {
    text-decoration: none;
    color: darkslategray;
}

html {
      scroll-behavior: smooth;
}

body {
    background-color: white;
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: darkslategray;
    box-sizing: border-box; 
    overflow-x: hidden; 
}

main {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
    max-width: 1280px;
    margin: auto;
    padding: 2rem 1rem;
    padding: 0 20px;
    gap: 64px;
}

h1, h2, h3 {
    font-family: Georgia, serif;
}

img {
    width: 100%;
    height: auto;
    display: block;
}


.header {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    margin-bottom: 64px;
    padding: 12px;
    text-align: center;
    background: aliceblue;
    border-style: none none solid none;
    border-width: 2px;
    border-color: darkslategray;
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.main-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.main-nav a {
    text-decoration: none;
    color: darkslategray;
    font-size: large;
    white-space: nowrap;
}

.main-nav a:hover {
    text-decoration: underline;
}

.main-nav span {
    text-decoration: none;
    color: darkslategray;
    font-size: large;
}

.header p {
    font-size: x-large;
}

.footer {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
    margin-top: 64px;
    padding: 24px;
    text-align: center;
    background: aliceblue;
    border-style: solid none none none;
    border-width: 3px;
    border-color: darkslategray;
    box-shadow: 0 -10px 20px rgba(0,0,0,0.15);
}

footer nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    font-size: x-large;
    white-space: nowrap;
}

footer a:hover {
    text-decoration: underline;
}

.office {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: auto;
    padding: 40px;
    min-width: 0;
    width: 100%;
    background-color: whitesmoke;
    background: linear-gradient(
    to bottom right,
    aliceblue,
    white,
    aliceblue
    );
    border-radius: 8px;
    box-shadow: 0 0px 20px rgba(0,0,0,0.1);
}

.office h2 {
    text-align: center;
    margin-bottom: 10px;
}

.office p {
    text-align: center;
    font-weight: bold;
}

.office-logo-wrapper {
    display: flex;
    justify-content: center;
}

.card {
    flex: 1 1 300px;  
    min-width: 0;
    width: 100%;
    margin: 0 auto;  
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: 0.3s;
}

.card:hover {
    transform: translateY(-3px);
     box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.card img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 10px;
}

.card a {
    text-decoration: none;
    color: darkslategray;
}

#orthodontics a:hover {
    color: blue;
}

#rtg a:hover {
    color:lightskyblue;
}

#physiotherapy a:hover {
    color:lightseagreen;
}

#dentistry a:hover {
    color:darkorchid;
}

.card h3 {
    text-align: center;
    margin-bottom: 16px;
}

.details {
    font-size: 14px;
    margin-bottom: 10px;
}

.hours {
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-size: 13px;
    color: gray;
}

.hours ul {
    text-align: center;
    list-style: none;
}

.notice {
    font-style: italic;
    color: red;
}

.icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin-right: 6px;
    color: darkslategray;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.underline-on-hover:hover {
    text-decoration: underline;
}

@media (max-width: 840px) {
    main {
        grid-template-columns: 1fr;
        max-width: 620px;
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .main {
        padding: 0 5px ;
    }
    .office {
        padding: 10px; 
    }
}